Querying Accounts

Last updated: 2021-08-31 09:29:32

    Feature Description

    This API is used to query whether app-owned accounts have been imported to IM. Batch query is supported.

    Call Description

    Example request URL

    https://xxxxxx/v4/im_open_login_svc/account_import?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
    

    Request parameters

    The following table only describes the parameters that are modified when this API is called. For more information on other parameters, see RESTful API Overview.

    Parameter Description
    https The request protocol is HTTPS, and the request method is POST.
    xxxxxx The country/region where your SDKAppID is located.
  • China: console.tim.qq.com
  • Singapore: adminapisgp.im.qcloud.com
  • v4/im_open_login_svc/account_check The request API.
    sdkappid The SDKAppID assigned by the IM console when an app is created.
    identifier The value of this parameter must be an app admin account. For more information, see App Admin.
    usersig The signature generated by the app admin account. For details on the operation, see Generating UserSig.
    random A random 32-bit unsigned integer ranging from 0 to 4294967295.

    Maximum call frequency

    100 times/second

    Example request packet

    {
    "CheckItem":
    [
        {
            "UserID":"UserID_1"
        },
        {
            "UserID":"UserID_2"
        }
    ]
    }
    

    Request packet fields

    Field Type Attribute Description
    CheckItem Array Required The account object array to check. A single request can be used to check up to 100 accounts.
    UserID String Required The UserID of the account to check.

    Example response packet

    {
      "ActionStatus":"OK",
      "ErrorCode": 0,
      "ErrorInfo":"",
      "ResultItem": [
          {
              "UserID": "UserID_1",
              "ResultCode": 0,
              "ResultInfo": "",
              "AccountStatus": "Imported"
          },
          {
              "UserID": "UserID_2",
              "ResultCode": 0,
              "ResultInfo": "",
              "AccountStatus": "NotImported"
          }
      ]
    }
    

    Response packet fields

    Field Type Description
    ActionStatus String The request processing result. OK: succeeded. FAIL: failed.
    ErrorCode Integer The error code. 0: succeeded. Other values: failed.
    ErrorInfo String Error information for the request processing failure.
    ResultItem Array The result object array of an account.
    UserID String The UserID of the account to check.
    ResultCode Integer The check result of an account. 0: succeeded. Other values: failed.
    ResultInfo String Error description information when an account fails to be checked.
    AccountStatus String The import status of an account. Imported: has been imported. NotImported: has not been imported.

    Error Codes

    Unless a network error (such as error 502) occurs, the HTTP return code for this API is always 200. ErrorCode and ErrorInfo in the response packet represent the actual error code and error information.
    For public error codes (60000 to 79999), see Error Codes.
    The following table describes the error codes specific to this API.

    Error Code Description
    70169 An internal server timeout has occurred. Please try again later.
    70202 An internal server timeout has occurred. Please try again later.
    70402 The parameters are invalid. Check whether required fields are specified and specified fields meet protocol requirements.
    70403 The request failed. The app admin permissions are required.
    70500 An internal server error has occurred. Please try again later.

    Debugging Tool

    Use the RESTful API online debugging tool to debug this API.

    References