tencent cloud

Feedback

IM Offline Push

Last updated: 2022-04-21 15:12:56

    Overview

    Offline message push allows your application to successfully receive pushed messages even when it is closed.
    If your IM application needs to use offline message push, activate the TPNS service. After TPNS is activated and authorized, you can use it to push IM messages offline and collect related statistics.

    Note:

    TPNS provides free basic offline push service for IM customers. If you need to use various types of data statistics and more push types provided by TPNS, upgrade your IM SDK to the latest version (integrated with TPNS SDK) and purchase the TPNS paid service.

    Preparations

    1. Prepare the following:
      Note:

      If you have configured vendor information (such as channel_id and the Tap-to-Redirect action) in IM, you do not need to create a new TPNS application. We will migrate IM vendor information to the TPNS application by April 15, 2022. Until then, you can still use the original offline message push capability.

    • Application package name
    • AppId, AppKey, and AppSecret allocated by the push platform of the Android vendor channel; iOS push certificate
    1. Activate TPNS by using the same Tencent Cloud root account as that of the IM service.
      Note:

      TPNS does not charge authorized IM applications for offline message push.

    2. Click Create Product to create a TPNS product.
    3. In the pop-up window, enter the product name, set the product category, select the service access point, and click Confirm.
      Note:

      Select a service access point (data storage location) based on the service region of your application. For example, you can select Guangzhou and Shanghai for services inside the Chinese mainland, and select Hong Kong (China) and Singapore for services outside the Chinese mainland.

    Confirming authorization status

    1. Log in to the TPNS console, select a target product, and click Configure Now.
    2. On the left sidebar, click Third party authorization.
    3. On the Third-Party Service Authorization page, change TPNS Application Authorization to IM Application Authorization.

      If you do not see the authorization mode change, check as follows:
    • Check whether an application is created in the IM service. If not, go to the IM console to create an IM application.
    • Check whether the current login account is an authorized sub-account. You are advised to switch to the root account.

    Adding authorization

    1. If this is your first time entering the IM application authorization page, the page shown as follows is displayed. Click OK.
    2. On the Tencent Cloud Instant Messaging page, click Add Authorization.
    3. In the pop-up window, select the name of the IM application under the current account, select the name of the TPNS product created in Preparations, select a TPNS application name, and click Submit.

      If an application has already been authorized, it cannot be selected, and you need to create another application or unauthorize the authorized application and authorize it again.

    Viewing application status

    If an application has been authorized to IM, check its status as follows:

    1. Log in to the TPNS console and go to the Product Management page. You can see that the value of the application in Service details has changed to IM push only (free).
    2. On the left sidebar, choose Message Management > Push Plan. You can see that a plan named IM message is automatically created.

    Application Configuration

    If you have configured vendor information in the IM service, data has been automatically synchronized, and you do not need to configure application settings. Otherwise, you need to configure the vendor channel (Android) or push certificate (iOS).

    Configuring the application package name

    1. Log in to the TPNS console, select a target product, and click Configure Now.
    2. On the left sidebar, choose Message Management > Basic Config, enter the application package name obtained in Preparations, and click Save.

    Configuring the Android vendor channel

    1. Log in to the TPNS console, select a target product, and click Configure Now.
    2. On the left sidebar, choose Message Management > Basic Config to go to the basic configuration page.
    3. In the Vendor Channel area, click corresponding to a vendor channel, enter the AppId, AppKey, and AppSecret obtained in Preparations, and click Save.

    Configuring the iOS push certificate

    1. Log in to the TPNS console, select a target product, and click Configure Now.
    2. On the left sidebar, choose Message Management > Basic Config to go to the basic configuration page.
    3. In the Push Certificate area, click Upload Certificate and upload the certificate as instructed.

      After the certificate is submitted, the uploaded certificate is displayed. For how to acquire a certificate, see Acquisition of Push Certificate.

    Viewing offline message statistics

    After completing configuration, you can view the corresponding offline message sending history.

    1. Log in to the TPNS console.
    2. On the left sidebar, choose Message Management > Push Plan, and click Details corresponding to the IM message plan to view the offline message sending history.

    Notes

    • An authorized IM application cannot be deleted directly. It needs to be unauthorized via third-party authorization first.

    • An authorized IM application service includes only the offline push feature. If you need to use other push services and data statistics, you need to enable them as instructed.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support