tencent cloud


Importing a Single Account

Last updated: 2022-06-09 17:22:47

    Feature Description

    This API is used to import an app-owned account to IM and create an internal ID for the account to ensure that the account can use the IM service.


    If the same account is imported to IM repeatedly, only one internal ID will be created for the account.

    Call Description

    Example request URL


    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
  • Seoul: adminapikr.im.qcloud.com
  • Frankfurt: adminapiger.im.qcloud.com
  • India: adminapiind.im.qcloud.com
  • v4/im_open_login_svc/account_import The request API.
    sdkappid The SDKAppID assigned by the IM console when an application is created.
    identifier The value must be the app admin account. For more information, see App Admin.
    usersig The signature generated by the app admin account. For more information on the operation, see Generating UserSig.
    random A random 32-bit unsigned integer ranging from 0 to 4294967295.
    contenttype Request format. The value is always json.

    Maximum call frequency

    200 times/second

    Example request packet


    Request packet fields

    Field Type Property Description
    UserID String Required The user name, which is a string of up to 32 bytes in length.
    Nick String Optional The user nickname.
    FaceUrl String Optional The URL of a user's profile photo.

    Example response packet body

     "ErrorCode": 0

    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 The error information.

    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
    40006 An internal server error occurred during profile setting. Try again later.
    40601 The length of the profile field value exceeds 500 bytes.
    70169 The server timed out. Try again later.
    70398 The number of accounts exceeds the limit. To create more than 100 accounts, upgrade your application to the Pro Edition. For more information on the directions, see Purchase Guide.
    70402 A parameter is invalid. Check whether the required fields have been specified or whether the fields are set according to protocol requirements.
    70403 The request failed. The app admin's permissions are required.
    70500 An internal server error has occurred. Try again later.

    Commissioning Tool

    Use the RESTful API online commissioning tool to commission this API.


    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