Skip to main content

Push notifications

About push notifications

Our push notifications feature enables you to inform the end-user that something is happening in your app that requires their attention.

This is an optional feature that you can configure in the application configuration. If you enable push, you can also toggle it when initiating the authentication.

Note

Push notifications can be used to improve the end-user experience, but you are not required to use them. They have no impact on the authentication operation itself.

Example use cases

  • You want to notify your end-users who are attempting to log in to your website that they have a login request to approve.
  • You want to notify your end-user on their mobile device that they have a transaction to authorise.

How to implement push notifications

To implement our push notifications feature, you need to:

Configure the application configuration

To use push notifications, you must first configure it in your application configuration. Once it has been configured, all devices using that application configuration have the ability to receive push notifications.

Prerequisites

Before you start, you need to create an APNs token (iOS) and set up a Firebase project (Android). To learn how to do this, use the buttons below:

Configure push notifications

Once you have completed the prerequisites, you can configure your app to use push notifications.

Configure Android and iOS simultaneously

Currently, you need to configure push notifications for Android and iOS simultaneously.

1. Add APNs token

You need to add the APNs token using the values obtained when you created it in the Apple Developer Program Portal.

To do this:

  1. See Add APNs provider token in the Encap REST API reference documentation.
  2. Supply the following values in the request:
    Field nameDescription
    NameGive the APNs token a name.
    DescriptionGive the APNs token a description.
    Key IDAdd the Key ID that you obtained when you created the token.
    Team IDAdd your Team ID that you obtained from Membership details.
    Private keyAdd the private key from the .p8 file that you downloaded when you created the token.

    Note: You can open the .p8 file using a text editor app.
2. Enable push notifications

You need to enable and configure push notifications in your application configuration.

To do this:

  1. See Update application configuration in the Encap REST API reference documentation.
  2. At a minimum, supply the following values in the request:
    Property nameRequired action
    NATIVE_PUSH_ENABLEDSet this to TRUE.
    FIREBASE_SERVICE_ACCOUNTAdd the contents of the .json key file obtained in the prerequisite step.
    apns_uuidAdd the ID of the APNs token that you created.
    APNS_BUNDLE_IDAdd the bundle ID obtained in the prerequisite step.
Want to learn more?

To learn more about the configurable properties, see the Push notifications section in our Application configuration documentation.

Configure the mobile SDK

You must also configure the SDK for push notifications. To learn how to do this, read the platform-specific documentation using the buttons below: