Adding User Tags
Feature Overview
This API is used by the administrator to add tags for users.
Note:
Up to 100 users' tags can be added at a time. In the request body, a maximum of 10 tags can be added for each user.
A maximum of 100 tags can be set for each user. If a user has more than 100 tags, you need to delete old tags before adding new ones for the user.
The maximum number of tags that can be set for an application is 1,000, that is, the deduplicated total number of tags for all users is up to 1,000.
The maximum length of a single tag is 50 bytes.
Sample Request URL
https://xxxxxx/v4/timpush/add_tag?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
Request Parameters
Parameter | Description |
https | The request protocol is HTTPS and the request method is POST. |
xxxxxx | The dedicated domain name corresponding to the country/region of the SDKAppID. 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/timpush/add_tag | Request API. |
usersig | |
identifier | The app admin account. |
sdkappid | The SDKAppID assigned by the Chat console when an application is created. |
random | A random 32-bit unsigned integer. |
contenttype | The value is always json . |
Maximum Call Frequency
100 times/second
Sample Request Packets
{"UserTags": [{"To_Account": "xiaojun012","Tags": ["a", "b"]},{"To_Account": "xiaojun013","Tags": ["a", "b"]}]}
Request Fields
Field | Type | Required | Description |
To_Account | String | Yes | Target user account. |
Tags | Array | Yes | Tag set. |
Sample Response Packets
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0}
Response Fields
Field | Type | Description |
ActionStatus | String | Processing result. OK : succeeded. FAIL : failed. |
ErrorCode | Integer | Error code. |
ErrorInfo | String | 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 packets represent the actual error code and error information. For common error codes (60000 to 79999), see Error Codes.
The following table describes the error codes specific to this API:Error Code | Description |
90001 | Failed to parse the JSON format. Check whether the request packets meet JSON specifications. |
90009 | The request requires app admin permissions. |
90018 | The number of requested accounts exceeds the limit. |
91000 | Internal service error. Try again. |
API Debugging Tool
References