Push tokens are systematically attached to a Google Cloud Messaging (GCM) or Firebase Cloud Messaging (FCM) project.
Each project has two IDs:
- A sender ID: set in the code of your app. Android Studio uses automatically the Sender ID of your Firebase Project. If you are still using GCM, you have probably set manually the sender ID in the code of your app. The sender ID identifies your app to Firebase Cloud Messaging when it asks for a token.
- An authorisation key (or server key): Set in Batch's dashboard settings > Push settings. It allows our servers to push the tokens generated for your Firebase project.
You will find more information on that part here: Finding your server key
Batch cannot push a token that hasn't been generated for the authorisation key used on your dashboard.
If you are seeing that error, then you probably:
- Switched to FCM without migrating your existing GCM project. Tokens are now generated for a project that is not the one you were using in the past, and that doesn't match the authorisation key set on Batch's dashboard.
- Changed the sender ID by mistake.
In order to fix the issue you can either:
- Migrate your old GCM project to Firebase, use it in Android Studio and send an updated version of your app to the Play Store.
- Or stick with the new project and add an additional Authorisation key on Batch's dashboard (in Settings > Push settings).