https://xxxxxx/v4/timpush/push?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
Parameter | Description |
https | Request protocol: HTTPS Request method: 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 Silicon Valley : adminapiusa.im.qcloud.com |
v4/timpush/push | Request API |
usersig | The signature generated by the App Administrator Account. For details on the procedure, see Generate UserSig |
identifier | |
sdkappid | SdkAppid assigned by the Chat console when an app is created |
random | 32-bit unsigned integer random number |
contenttype | Fixed value: json |
{"From_Account": "administrator","MsgRandom": 3674128,"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
{"From_Account": "administrator","MsgRandom": 3674128,"OfflinePushInfo": {"PushFlag": 1, // 0 means offline push enabled, 1 means offline push disabled"Ext": "Transparent content"}}
{"From_Account": "administrator","MsgRandom": 124032,"Condition": {"TagsAnd": ["Stock A","Stock B"]},"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
{"From_Account": "administrator","MsgRandom": 124032,"Condition": {"TagsOr": ["Stock A","Stock B"]},"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
{"From_Account": "administrator","MsgRandom": 389475,"Condition": {"AttrsAnd": {"Membership Level": "Ultra-Platinum Member","city": " Shenzhen "}},"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
{"From_Account": "administrator","MsgRandom": 389475,"Condition": {"AttrsAnd": {"Membership Level": "Ultra-Platinum User","city": " Shenzhen "}},"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
Field | Type | Attribute | Description |
From_Account | String | Optional | Message Sender Account (supports specifying any existing account) If the sender is not specified or the specified sender does not exist, the default will be the caller's account. |
MsgRandom | Integer | Required | Message Random Number (32-bit unsigned integer), used by the backend for deduplication of messages within the same second. Please ensure that this field is filled with random values |
Condition | Object | Optional | Condition has four types: AttrsOr means attribute's "Or Condition" AttrsAnd means attribute's "And Condition" TagsOr means Tag's "Or Condition" TagsAnd means Tag's "And Condition" AttrsOr, AttrsAnd, TagsOr, TagsAnd cannot coexist. If there is no Condition, it will be pushed to all users. |
TagsOr | Array | Optional | Union of Tag conditions. Tag is a string of no more than 50 bytes. Attribute push and Tag push cannot simultaneously be push conditions. The number of Tags in the TagsOr condition does not exceed 10. |
TagsAnd | Array | Optional | Intersection of Tag conditions. Tag is a string of no more than 50 bytes. Attribute push and Tag push cannot simultaneously be push conditions. The number of Tags in the TagsAnd condition does not exceed 10. |
AttrsOr | Object | Optional | Union of attribute conditions. Attribute push and Tag push cannot simultaneously be push conditions. |
AttrsAnd | Object | Optional | Intersection of attribute conditions. Attribute push and Tag push cannot simultaneously be push conditions. |
OfflinePushInfo | Object | Optional |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TaskId": "53743040_144115212910570789_4155518400_15723514"}
Field | Type | Description |
ActionStatus | String | Result of request processing: OK: Indicates successful processing FAIL: Indicates failure |
ErrorCode | Integer | Error code |
ErrorInfo | String | Error message |
TaskId | String | Push task ID |
Error code | Description of Meaning |
90001 | Failed to parse the JSON string, please check if the request packet conforms to JSON format. |
90005 | The MsgRandom field is missing in the JSON format request body or the MsgRandom field is not of Integer type. |
90009 | The request requires App Administrator access. |
90020 | Tag length exceeds the limit (cannot exceed 50 bytes). |
90022 | Duplicate Tag in TagsOr and TagsAnd in push conditions. |
90024 | Excessive Frequency of Push, the interval between two pushes must be greater than 1 second. |
90026 | Message offline storage time error (must not exceed 7 days). |
90032 | The number of tags in push conditions exceeds 10, or the number of tags in the add tag request exceeds 10. |
90033 | Invalid attribute. |
90039 | Attribute push and Tag push cannot coexist. |
90040 | One of the tags in the push conditions is empty. |
90045 | The all-staff/Tag push feature is not activated. |
90047 | The number of pushes has exceeded the daily limit (default is 100 times). |
90056 | The request body for universal push notification is too large. Currently, a maximum length of 10K is supported. |
91000 | Internal service error. Please try again. |