https://xxxxxx/v4/timpush/add_tag?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
Parameter | Description |
https | The request protocol is: HTTPS Request method: POST |
xxxxxx | The dedicated domain corresponding to the country/region of your SDKAppID. China: console.tim.qq.comSingapore : adminapisgp.im.qcloud.comSeoul : adminapikr.im.qcloud.comTokyo: adminapijpn.im.qcloud.comFrankfurt : adminapiger.im.qcloud.comSilicon Valley : adminapiusa.im.qcloud.comJakarta: adminapiidn.im.qcloud.com |
v4/timpush/add_tag | Request API. |
usersig | |
identifier | |
sdkappid | SdkAppid assigned by the Instant Messaging Console when an application is created. |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295. |
contenttype | Fixed value: json |
{"UserTags": [{"To_Account": "xiaoming","Tags": ["GoldMember", "WeekPassUser"]},{"To_Account": "379C2F0D-290D-47AE-94D1-919058C39C77" // Automatically generated RegistrationID when push service registration is successful"Tags": ["PlatinumMember", "MonthPassUser"]}]}
{"Replace": 1, // Overwrite ALL tags of the current user"UserTags": [{"To_Account": "xiaoming","Tags": ["GoldMember", "WeekPassUser"]},{"To_Account": "379C2F0D-290D-47AE-94D1-919058C39C77", // Automatically generated RegistrationID when push service registration is successful"Tags": ["PlatinumMember", "MonthPassUser"]}]}
Field | Type | Attribute | Description |
Replace | Integer | Optional | 0 means add tag on the basis of existing ones, 1 means overwrite ALL tags of the current user. Default value is 0 |
UserTags | Object Array | Required | Account tag information. |
Field | Type | Attribute | Description |
To_Account | String | Required | Target User Account. |
Tags | Array | Required | String tag array, the maximum length of a single tag should not exceed 50 bytes. Maximum array length is 10 when Replace=0 Maximum array length is 100 when Replace=1 |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"ErrorList": [{"ErrorCode": 90035, // A tag can only be applicable to one account type."To_Account": "379C2F0D-290D-47AE-94D1-919058C39C77"}]}
Field | Type | Description |
ActionStatus | String | Processed Request Result: OK: Indicates successful processing. FAIL: Indicates failure. |
ErrorCode | Integer | Error code. |
ErrorInfo | String | Error message. |
ErrorList | Object Array | Set attributes may result in partial user success and partial failure. Error message list for failed accounts. |
Field | Type | Description |
To_Account | String | Target user account. |
ErrorCode | Integer | Error code. |
ErrorInfo | String | Error description, which may be empty. |
Error code | Description |
90001 | Failed to parse the JSON format. Please ensure the request packet conforms to the JSON specification. |
90009 | The request requires App Administrator permissions. |
90018 | The number of requested accounts exceeds the limit. |
91000 | Internal service error, please try again. |
90035 | A tag can only be applicable to one account type. When registering a push service successfully, RegistrationID is automatically generated for the IM account type. For details, see Introduction to Typical Push Scenarios. |
Feedback