Batch allows you to find information on your installation and save your push token to send test notifications to your web browser.

This is useful to test your integration or make sure the notification you are editing looks as expected on desktop or mobile.

Here is how to proceed:

1. Locate your Installation ID

Open your website, right-click somewhere on the page and select "Inspect" or "Inspect Element" in the context-menu that appears.

Once you have the developer tools open, click the "Console" tab, paste the following code:

"batchSDK"in window?window.batchSDK(function(a){a.getInstallationID().then(function(a){window.prompt("Here is your Batch Installation ID",a)})}):window.alert("Batch SDK is not running");

Batch's SDK will return your Installation ID:

2. Find information on your device

On Batch's dashboard, go to Settings > Debug, paste your Installation ID to find your device token. Then click "Save as a test device" below the "Push token" field.

Note: Web push notifications do not work in incognito mode.

3. Sending a test notification

You can send a test notification from 3 different places:

a) From the debug tool

In case you just need to test your integration, you can use the "Send a test" button (see screenshot above). Batch will send a generic message with an image to your device.

b) From the list of registered test devices

You can see the list of all the registered test devices from Settings > Push Settings. This is helpful to check if the token of your saved devices are still valid and delete them if it's not the case.

c) From the campaign editor

You can send test notifications to your a saved device or to a push token you already know from the message editor. Just click the ⚙️ to select your device and "Send a test".

Did this answer your question?