Push Token Migration

A push token is a unique key, created and assigned by Apple or Google to create a connection between an app and an iOS, Android, or web device. Push Token migration is the importing of those already-generated keys into Braze’s platform.

Braze customers who were previously sending push notifications, either on their own or with a different provider, often have a list of users with registered push tokens.

To continue sending push messages to these users during the Braze SDK integration process, you can import these tokens into Braze and target those users using Braze’s Campaign tool.

Migration via API

You can migrate your tokens by importing them with our API.

Use the users/track endpoint and post the following information:

1
2
3
4
5
6
7
8
9
10
11
"app_group_id" :
"attributes" : [
    {
      "push_token_import" : true
      "push_tokens": [
          "app_id": ""
          "token": ""
          "device_id": ""
      ]
    }
]

When specifying push_token_import as true:

  • The external_id and braze_id should not be specified.
  • The attribute object must contain a push token
  • If the token already exists in Braze, the request is ignored. Otherwise, Braze will create a temporary, anonymous user profile for each token to enable you to continue to message those users.

After import, as each user launches the Braze-enabled version of your app, Braze will automatically move their imported push token to their Braze user profile and clean up the temporary profile.

Braze will check once a month to find any anonymous profile with the push_token_import flag that doesn’t have a push token. If the anonymous profile no longer has a push token, we will delete the profile. However, if the anonymous profile still has a push token, suggesting that the actual user has yet to login to the device with said push token, we will do nothing.

Sending Push before Braze SDK Integration (Android Only)

If you find that you must send a push notification to your users before the Braze SDK integration is complete, you can use key-value pairs to validate push notifications.

You must have a receiver to handle and display push payloads.

To notify the receiver of the push payload, add the necessary key-value pairs to the push campaign. The values of these pairs is contingent on the specific push partner you used before Braze.

For some push notification providers, you will need to flatten the key-value pairs so that they can be properly interpreted. To flatten key-value pairs for a specific Android app, navigate to the “Internal Tools Page”, then “Company Settings”. Scroll to the “Flatten Push Payload” section, where you can add the setting for specific apps in your company’s app group.

WAS THIS PAGE HELPFUL?
New Stuff!