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.
Note:
If the same account is imported to IM repeatedly, only one internal ID will be created for the account.
https://console.tim.qq.com/v4/im_open_login_svc/account_import?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
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_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. |
200 times/second
{
"Identifier":"test",
"Nick":"test",
"FaceUrl":"http://www.qq.com"
}
Field | Type | Property | Description |
---|---|---|---|
Identifier | 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. |
{
"ActionStatus":"OK",
"ErrorInfo":"",
"ErrorCode": 0
}
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. |
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 |
---|---|
40005 | The profile field contains sensitive words. |
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. |
Use the RESTful API online commissioning tool to commission this API.
Was this page helpful?