This API is used by the admin to add tags for users.
Note:
- Each request can add tags for a maximum of 100 users. 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 length of a single tag is 50 bytes.
Pushing to all users is available only to the Ultimate edition. To use it, you need to purchase the Ultimate edition, go to the console, choose Feature Configuration > Login and Message > Push to all users, and enable the feature.
https://xxxxxx/v4/all_member_push/im_add_tag?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
Parameter | Description |
---|---|
https | The request protocol is HTTPS and the request method is POST. |
xxxxxx | Domain name corresponding to the country/region where your SDKAppID is located.console.tim.qq.com adminapisgp.im.qcloud.com adminapikr.im.qcloud.com adminapiger.im.qcloud.com adminapiind.im.qcloud.com adminapiusa.im.qcloud.com |
v4/all_member_push/im_add_tag | Request API |
usersig | Signature generated in the app admin account. For more information, see Generating UserSig. |
identifier | The app administration account. |
sdkappid | SDKAppID assigned by the Chat console when an app is created |
random | A random 32-bit unsigned integer |
contenttype | The value is always json . |
100 times/second
{
"UserTags": [
{
"To_Account": "xiaojun012",
"Tags": ["a", "b"]
},
{
"To_Account": "xiaojun013",
"Tags": ["a", "b"]
}
]
}
Field | Type | Required | Description |
---|---|---|---|
To_Account | String | Yes | Target user account |
Tags | Array | Yes | Tag set |
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode":0
}
Field | Type | Description |
---|---|---|
ActionStatus | String | Request result. OK : Successful; FAIL : Failed |
ErrorCode | Integer | Error code |
ErrorInfo | String | 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 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 |
---|---|
90001 | Failed to parse the JSON format. Check whether the JSON request meets JSON specifications. |
90009 | The request requires app admin permissions. |
90018 | The number of requested accounts exceeds the limit. |
91000 | Internal service error. Try again. |
Use the RESTful API online debugging tool to debug this API.
Was this page helpful?