Setting Up Push Notifications

To display push notifications on mobile devices, make sure that the following conditions are satisfied:

To set up sending of push notifications to mobile devices, use the Push Notifications subsection:

Set parameters depending on the OS type in use and added templates:

NOTE. Select JSON file in the Firebase Service Account JSON-File parameter or set the Firebase OAuth 2.0 Access Token and Firebase Project Id parameters. When the Firebase Service Account JSON-File parameter is used, setting the Firebase OAuth 2.0 Access Token and Firebase Project Id parameters is not needed.

NOTE. The Firebase Service Account JSON-File, Firebase OAuth 2.0 Access Token, and Firebase Project Id parameters are available only if the Via Firebase Cloud Messaging checkbox is selected. When the Firebase service is used, the APNs parameters specified below become not available.

NOTE. To work with APNS server, disable authentication and traffic SSL inspection on the proxy server.

After setting up push notifications parameters click the Save button.

Sending Push Notifications

Push notifications sending algorithm:

  1. User authentication with specifying device DeviceID. The response contains api_sessionid used in further requests.

  2. The device token request from the corresponding push notifications service (for Android - Firebase, for iOS - APNS, for Windows - WNS) on a mobile device.

  3. Token sending to mobile platform server with a link to device and specifying platform, service, and token itself.

NOTE. If the sent token already exists in the project but is linked to another user, the server unlinks them and links the token to the API user who sends the request.

  1. Send a request:

Methods and requests to send push notifications are given in the Methods for Working with Push Notifications section.

To check state of push notification sending, see the Checking State of Push Notification Sending section.

See also:

Setting Up Environments and Projects | Adding a Message Topic | Adding Push Notification Templates | Checking State of Push Notification Sending