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.comSingapore : adminapisgp.im.qcloud.comSeoul : adminapikr.im.qcloud.comFrankfurt : adminapiger.im.qcloud.comSilicon Valley : adminapiusa.im.qcloud.comJakarta: adminapiidn.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 | A random 32-bit unsigned integer ranging from 0 to 4294967295 |
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": 124032,"Condition": {"TagsOr": ["Stock A","stock B"],"TagsNot": ["Stock C","Stock D"] // Push scope: ("Stock A" or "stock B") and not ("Stock C" and "Stock D")},"OfflinePushInfo": {"PushFlag": 0, // 0 means perform offline push, 1 means do not perform offline push"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 | 32-bit unsigned integer random number, with a value range from 0 to 4294967295 Backend uses message deduplication within the same second. Please ensure it is a random number. |
Condition | Object | Optional | Push the filter criteria for the current audience. If the Condition is not filled, it pushes to all users. For details, see Condition Field Description. |
OfflinePushInfo | Object | Optional | |
DataId | String | Optional | The customer's business custom identifier. This field will be passed through to the app backend during the callback. The field is limited to a maximum of 64 bytes. |
Field | Type | Attribute | Description |
TagsOr | String Array | Optional | Union of tag conditions, array length not exceeding 10. |
TagsAnd | String Array | Optional | Intersection of tag conditions, array length not exceeding 10. |
TagsNot | String Array | Optional | Negation of tag conditions (first take the union of multiple tags, then complement the result), array length not exceeding 10. |
AttrsOr | Object | Optional | Union of attribute conditions, array length not exceeding 10. |
AttrsAnd | Object | Optional | Intersection of attribute conditions, array length not exceeding 10. |
{"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. |
90057 | The provided DataId exceeds the maximum allowed length of 64 bytes. |
91000 | Internal service error. Please try again. |
Feedback