Message Recall

Last updated: 2021-08-17 17:04:49

    Use Cases

    If a notification message sent by an application contains an error or incorrect redirect link, it will give end users a negative impression of the involved product/service after they view or click it. In this case, you should fix the problem in time. You can choose to terminate, recall, or override the message. This document describes how to do so through the console and RESTful APIs.

    Feature Description

    • Message termination: terminates all offline messages within the offline storage period of the task.
    • Message recall: terminates the current message and makes it disappear from the notification center on devices where it has arrived but has not been clicked. A recall is imperceptible to users.
    • Message override: terminates the current message and overrides it with a new one. After a successful override, only the new message will be displayed in the device notification center.

    Use Limits

    Platform Termination Recall Override
    Android Supported Supported only for the TPNS channel Supported only for the TPNS channel, Mi channel, Meizu channel, and Huawei devices on EMUI 10 and above
    iOS Not supported Supported
    Notes:
  • If the application process is manually ended, the message cannot be recalled.
  • Message recall instructions are delivered to devices as silent messages and they have the characteristics of silent messages. They will wake up application processes and therefore cause a surge in the number of active applications. You are advised to use the Override feature with priority.
  • Supported
    Note:

    Message termination, recall, and override are supported only for notifications whose push target is "All devices", "Batch accounts", or "By tags".

    Using the Console

    1. Log in to the TPNS console.
    2. Go to Push Management > Task List.
    3. Click View Details for the push task to be terminated, overridden, or recalled.
    4. In the Push Progress column in the top-right corner of the push details page, terminate, override, or recall the task.
      Note:

      When you select message override, for vivo, OPPO, and Huawei (below EMUI 10) devices that do not support message override, you can choose whether to continue the message delivery:

      • If you choose to continue the delivery, the notification message will be overridden, and both the new and original messages will appear in the device notification center at the same time.
      • If you choose to abort the delivery, no new notification messages will be sent to the above devices that do not support message override.
    5. After the operation succeeds, you can return to the Task List page and view the current status of the task in the Status column.

    Using RESTful APIs

    Message termination

    API description

    Request method: POST
    Request address:

    Service URL/v3/push/stop_push_msg
    

    API service URLs correspond to service access points one to one. Please select the service URL corresponding to the service access point of your application.

    Request parameters

    Parameter Type Required Description
    pushId String Yes Push task ID

    Sample request

    {
        "pushid":"43214535"
    }
    

    Message recall

    API description

    Request method: POST
    Request address:

    Service URL/v3/push/revoke_push_msg
    

    API service URLs correspond to service access points one to one. Please select the service URL corresponding to the service access point of your application.

    Note:

    Message recall will terminate the offline message delivery of the current push task by default.

    Request parameters

    Parameter Type Required Description
    pushId String Yes Push task ID

    Sample request

    {
        "pushid":"150032"
    }
    

    Message override

    Step 1. Query the collapse_id of the push task

    Call the API for querying push information for one task and get the collapse_id, for example, 0001, from the corresponding response parameter.

    Step 2. Call the push API to override the original push content

    When you call the push API, add the collapse_id, for example, 0001, obtained in step 1. You can also set the force_collapse field to specify whether to deliver the message to devices that do not support message override.

    Note:

    Message override will terminate the offline message delivery of the original push task by default.

    Sample push

    {
       "audience_type": "all",
       "collapse_id": 0001,
      "force_collapse":false,
       "message_type": "notify",
       "message": {
           "title": "Override message 0001",
           "content":"It's a nice day today"        
       },
       "platform": "android"
    }