Skip to main content
All CollectionsGetting startedAdvanced
How does Batch manage push tokens?
How does Batch manage push tokens?

Everything you need to know on how Batch collects and manages push tokens.

Baptiste avatar
Written by Baptiste
Updated over 7 months ago

A push token is an anonymous ID generated by Apple (iOS) or Google (Android) for your installation. Batch's SDK collects automatically that token each time you open the app and sends it to our servers. If your users were offline the first time they opened your app, Batch will collect the token the next time they open it with a working Internet connection.

Each time you schedule a push campaign from the dashboard, Batch will:

  1. Select the installs matching your campaign targeting;

  2. Find the tokens attached to these installs;

  3. Send the list of targeted tokens to Apple/Google with the message you want to deliver to these users.

Apple and Google automatically invalidate push tokens when users uninstall the app. They will generate a new token if the same users reinstall the app later.

Batch automatically takes care of updating/cleaning your users’ tokens so you can just focus on the wording of your next push campaign. Please note we do not receive that kind of feedback in real time. We receive information on the validity of your users' tokens each time you try to send them a push notification. 

🚧 Note on token invalidation:

Please note that test push notifications do not trigger a token invalidation feedback by Apple or Google even if the device is no longer reachable, only push campaigns in production will trigger a token invalidation feedback by Apple or Google if the device is no longer reachable. The response time from Apple or Google is very variable, the push token can be considered valid by Apple for several days or even weeks after their invalidation in some cases.

Also, note that Google invalidates push tokens after 9 months (270 days) of device inactivity (= no activity on the entire device, not only on a specific app). Targeting an inactive user will generate an "invalid token" feedback in this case.

🚧 Note for web push:

Web push notifications work in a similar way. The token is provided by the push service of each browser (e.g. Google for Chrome, Mozilla for Firefox, etc). We also receive feedback on the validity of the token each time we try to push it.


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?