이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

Recalling Push

If there is an error in the content pushed to all/tagged users, it will have a negative impact on the product when end users view or click the content. In this case, it is necessary to handle it in a timely manner. You can choose to recall the push.

Feature Overview

Termination: The delivery of push tasks takes some time, and the delivery to accounts for which the tasks have not been delivered will be terminated.
Recall: For accounts for which the tasks have been delivered, unread and roaming messages can be recalled.
Overwrite: If an account has received an offline push, that push can be overwritten.
This API supports the the termination, recall, and overwrite of push tasks for all or tagged users. In the following, termination/recall/overwrite will be referred to as recall by default.
The validity period for recall is 24 hours, calculated from the time of task initiation. Push tasks that exceed 24 hours cannot be recalled.

API Call Description

Sample Request URL

https://xxxxxx/v4/timpush/revoke?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/revoke
Request API.
usersig
The signature generated by the app admin account. For details, see Generating 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

1 time/second

Sample Request Packets

{
"TaskId": "660cc447_537ed82a_200000cd7ee17f5_84035729_bc614e", // TaskId of push sent within 24 hours.
"OfflinePushInfo": { // If roaming/unread messages are not specified to be saved (OnlineOnlyFlag=0) during the push,
// OfflinePushinfo must be included during recall.
"Title": "recall title",
"Desc": "The other party has recalled a message."
}
}
Note:
1. Vendors that support offline push overwrite: APNS/Google FCM/Huawei/Honor. Offline push from other vendors does not support overwrite. (Google FCM's notification mode supports overwrite, while the data mode currently does not support.)
2. During recall, if the recipient is in the foreground and the offline push (notification message) is read by default, the offline push will not be overwritten.

Request Fields

Field
Type
Required
Description
TaskId
String
Yes
Push task ID.
OfflinePushInfo
Object
No
The information to be pushed offline. For more information, see Message Formats.
Note:
If OfflinePushinfo.PushFlag=1 or OfflinePushInfo is not set, offline push will not be overwritten.

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.
90049
Recall TaskId is illegal and there is no push record. The returned TaskId can only be used for recall when the task is pushed through the timpush/push API.
90050
Repeated recall. Push tasks that have already been recalled cannot be called repeatedly.
90051
Recall is too frequent. The recall frequency limit is 1 time per second.
90052
The recall validity period has been exceeded. The recall must be within 24 hours, and push tasks that exceed 24 hours cannot be recalled.
90053
Invalid recall. Push with OnlineOnlyFlag=0, but the recall does not include OfflinePushInfo.
91000
Internal service error. Try again.

API Debugging Tool

Use the RESTful API online debugging tool to debug this API.

References