Deleting Accounts

Last updated: 2020-05-14 17:54:40

    Feature Description

    • Only trial accounts can be deleted.
    • When an account is deleted, the account’s relationship chain and other relevant data will also be deleted.
    • After an account is deleted, the account’s data cannot be restored. Therefore, exercise caution when using this API.

    Call Description

    Example request URL

    https://console.tim.qq.com/v4/im_open_login_svc/account_delete?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
    v4/im_open_login_svc/account_delete 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

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

    Request packet fields

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

    Example response packet

    {
        "ActionStatus":"OK",
        "ErrorCode": 0,
        "ErrorInfo":"",
        "ResultItem": [
            {
                "ResultCode": 0,
                "ResultInfo": "",
                "UserID": "UserID_1"
            },
            {
                "ResultCode": 70107,
                "ResultInfo": "Err_TLS_PT_Open_Login_Account_Not_Exist",
                "UserID": "UserID_2"
            }
        ]
    }

    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.
    ResultCode Integer The error code for an account. 0: succeeded. Other values: failed.
    ResultInfo String Error description information when an account fails to be deleted.
    UserID String The UserID of the account to delete.

    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
    30006 An internal server error occurred when the relationship chain data is cleared. Please try again later.
    30007 An internal server timeout occurred when the relationship chain data is cleared. Please try again later.
    30008 A write conflict was triggered when relationship chain data is written concurrently. We recommend the batch mode.
    40006 An internal server error occurred when data is cleared. Please try again later.
    70107 The UserID to delete does not exist. Check that the UserID is valid.
    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.
    71000 Failed to delete the account. Only trial accounts can be deleted. Your current app is a professional edition, and account deletion is not supported.

    Debugging Tool

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

    References

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help