tencent cloud

Feedback

Deleting Accounts

Last updated: 2024-08-20 17:02:58

    Feature Description

    The Chat trial edition and Chat developer edition applications support account deletion by default. For other types of applications (such as: TRTC, whiteboard, professional edition, ultimate edition), it needs to be enabled in the console.
    Note:
    For specific package types, you can enter the application page in the Console, and click Application > Application Details > Plan to view.
    Note:
    After deleting an account, the user's data will be irrecoverable, please use this interface with caution.
    When deleting an account, that user's contacts, profile, groups, sessions, and other data will also be deleted.
    The Chat trial edition and Chat free trial edition support importing deleted UserIDs. For other types of applications (such as: TRTC, whiteboard, professional edition, ultimate edition), deleted UserIDs are not allowed to be re-imported within 3 months.

    API Calling Description

    Sample request URL

    https://xxxxxx/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 modified parameters when this API is called. For more information on other parameters, please 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
    Seoul: adminapikr.im.qcloud.com
    Frankfurt: adminapiger.im.qcloud.com
    Silicon Valley: adminapiusa.im.qcloud.com
    Jakarta: adminapiidn.im.qcloud.com
    v4/im_open_login_svc/account_delete
    Request API
    sdkappid
    SDKAppID assigned by the console when the app is created
    identifier
    App admin account. For more information, please see the App Admin section in Login Authentication.
    usersig
    Signature generated in the app admin account. For details on how to generate the signature, please see Generating UserSig.
    random
    A random 32-bit unsigned integer ranging from 0 to 4294967295
    contenttype
    Request format. The value is always json.

    Maximum calling frequency

    100 calls per second

    Sample request packet

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

    Request packet fields

    Field
    Type
    Required
    Description
    DeleteItem
    Array
    Yes
    Account array to delete. A single request can contain up to 100 accounts.
    UserID
    String
    Yes
    UserID of the account to delete

    Sample 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
    Request result. OK: successful; FAIL: failed
    ErrorCode
    Integer
    Error code. 0: successful; other values: failed
    ErrorInfo
    String
    Error information about the request failure
    ResultItem
    Array
    Array of results for different accounts
    ResultCode
    Integer
    Error code for the account. 0: successful; other values: failed
    ResultInfo
    String
    Error information about the failure to delete the account
    UserID
    String
    UserID of the account to delete

    Error Codes

    The returned HTTP status code for this API is always 200 unless a network error (such as error 502) occurs. The specific error code and details can be found in the response fields ErrorCode and ErrorInfo respectively. For public error codes (60000 to 79999), please see Error Codes. The following table describes the error codes specific to this API:
    Error Code
    Description
    30006
    An internal server error occurred while clearing contacts data. Try again later.
    30007
    Internal server timeout occurred while clearing contacts data. Try again later.
    30008
    A write conflict occurred while writing contacts data. You are advised to use the batch mode.
    40006
    An internal server error occurred while clearing profiles. Try again later.
    70107
    The UserID to delete does not exist. Make sure that the UserID is valid.
    70169
    Server timeout. Try again later.
    70202
    Server timeout. Try again later.
    70402
    Invalid parameters. Make sure that the required fields are all entered and the parameter settings meet the protocol requirements.
    70403
    Request failed. App admin permissions are required to perform this operation.
    70500
    Internal server error. Try again later.
    71000
    Failed to delete accounts. Only accounts of apps using the Chat Trial plan can be deleted. Your current app is using the Pro plan and therefore does not support deleting accounts.

    API Debugging Tool

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

    References

    Importing a Single Account (v4/im_open_login_svc/account_import)
    Importing Multiple Accounts (v4/im_open_login_svc/multiaccount_import)
    Invalidating Account Login States (v4/im_open_login_svc/kick)
    Querying Account Online Status (v4/openim/query_online_status)
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support