Push Registration

Understanding Push Tokens and what they are is a fundamental piece of understanding how we send Push Tokens here at Braze. A Push Token is an identifier that senders use to target specific devices with a push notification. If a device does not have a push token, there is no way to send push to it. This article covers the process through which a user gets assigned a push token, and how Braze sends Push messages to your users.

Push Tokens are generated by Push Service Providers. Braze connects with Push Service Providers Firebase Cloud Messaging Service (FCMs) for Android and Apple Push Notification Service (APNs) for iOS. Each device has one, unique token that is used for messaging. Tokens can expire or be updated.

Android and iOS deal with Push token registration in different ways:

  • Android: Receives a token as soon as a user downloads and opens an application, automatically registering users for Push Notifications.
  • iOS: Not automatically registered.
    • iOS 12: If you have provisional authorization set up, you will be allowed to send notifications silently to the notification center of the device. These notifications may prompt users to decide to continue to receive notifications. Their push subscription state is dependent on the user’s response to this prompt.
    • iOS 11 and Later & iOS 12 (without Provisional Authorization):
      The native Push notification prompt appears for new users to an application. Users respond to this prompt by selecting allow or deny. Deny denies push token registration, therefore denying push notifications to your phone from that application. Allow registers and creates a new push token, then and there.
Get a Push Token Send a Push Token
Applications must register with a push provider in order to get a push token for a device. Developers can then target the device using the push token generated by FCM/APNs.

Two ways to Check a Users Push Registration State:

  1. User Profile: Individual user profiles can be accessed through the Braze dashboard by selecting User Search from the right sidebar. Here, you can look up user profiles by email address, phone number, or external user ID. Once in a user profile, under the Engagement tab, you can view a user’s push registration state.

  2. Rest API Export: Individual user profiles can be exported in the JSON format using the users/export/ segment or identifier endpoints by using Braze’s REST API. Braze will return a push tokens object, that contains push enablement information per device, as well as an additional notifications_enabled parameter that will signify if a user blocked notifications from displaying (the previous Android SDK version does not have the notifications_enabled parameter).

Push Token Management

Check out the chart below for actions that lead to push tokens changes or removal from user profiles.

Action Description
changeUser() Method Called The Braze changeUser() method switches the user ID that the SDKs are assigning user behavior data to. This method is usually called when a user logs into an application. When changeUser() is called with a different or new user ID on a specific device, that device’s push token will be moved to the appropriate Braze profile with corresponding user ID.
Push Error Occurs Some common push errors that lead to token removal include MismatchSenderId, InvalidRegistration, and other types of push bounces.
Check out our full list of common push errors.
User Uninstalls When a user uninstalls the application from a device, Braze will remove the user’s push notification from the profile.

What Does this Look Like on a Broader Scale?

When a user opens a new application, if push has been configured correctly, a call is made from the Braze SDK to the Push Providers. When that call is made, the Push Provider runs a check to see if everything is set up correctly. If so, a push token gets passed into your device. When that token arrives, the SDK communicates this to Braze. Once Braze has received the token from the Push Provider, we update or create a new user profile. These users are now considered Registered.

If we want to launch a campaign, we create a campaign in Braze that generates a push payload to send to the Push Provider. From there, the Provider delivers the Push Payload to the user’s device and the SDK passes the messaging state to Braze.

Picture

Registration steps Messaging steps
1. Customer (device) registers to push provider
2. Provider generates and delivers push token
3. Flush tokens in Braze
1. Braze sends push payload to provider
2. Provider delivers the push payload to the device
3. SDK passes messaging stats to braze
WAS THIS PAGE HELPFUL?
New Stuff!