The installation ID is an anonymous ID generated by Batch the first time users open your app or your website, either they opt-in for push notifications or not. That ID changes each time users reinstall your app.
You can use that ID in the debug tool (Dashboard settings > Debug) to find your own install, see the data Batch has on it and send test notifications to your device.
Your end users can also send it to you so you can understand why they are not receiving push notifications or not seeing an In-App message. This is useful when your app doesn't share any advertising ID with Batch.
You can also store the install ID on your end and reuse it later to target specific installs using the Transactional API.
1. Retrieving the installation ID
You can retrieve the installation ID by calling the following methods:
window.batchSDK(api => api.getInstallationID().then(console.log))
2. Displaying the installation ID
That installation ID can safely be exposed to your end users. You can:
- Insert it in a diagnostic email automatically generated when users report an issue from the app.
- Hide it in an easter egg (e.g. display it after 10 taps on specific button, etc).
- Or simply display it in your app settings or on your website (web push only).
Need more help?
If you have any question, don't hesitate to ping us at firstname.lastname@example.org, or directly on the live-chat!