Skip to main content
All CollectionsPush NotificationsWeb
How to test web push on the development environment?
How to test web push on the development environment?

Here is all you need to know to review your web push integration in a preprod environment.

Claire avatar
Written by Claire
Updated over 5 months ago

If you tried to test your web push integration and got a 401 unauthorized error in the console of your browser, you most likely need to take the following steps : 

1. Add Your Test URL as an Allowed Dev Origin

Go to the Settings > Push settings section of your dashboard and add your test URLs in the "Allowed dev origins" field.

Additional step to test your Safari setup

Web push standard protocol is supported on Safari starting from v.16.1 on macOS Ventura (released in October 2022). If your web push integration includes additional steps to extend the support of Web Push notifications to previous versions of Safari, please follow the steps below.

You need to add your testing domain as a new allowed domain. To do that, go to Go to the Settings > Push settings > Website Push Configuration and click on "Add New Domain".

You will also need to upload a push certificate generated for that domain as indicated here: Generating the .p12 certificate.

Note : Please note that to test this part of the integration, you need to be on a Safari version < 16.1.

2. Switch to Dev Environment in the Tag Configuration

Add the following parameter to the JavaScript tag you added to the code of your website:

dev: true

🚧 Important: don't forget to remove this line in production. 


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?