# Testing your integration

### Allowed Origins

This allows you to test your implementation on domains declared in the *"Allowed origins"* field in the *"Settings > Channels > Push > Web"* section of your dashboard.

![Allowed origins](/files/IkOE2OkQALRYW4mZmzHp)

If you implemented Safari APNs and want to test your Safari implementation, you also need to add your testing domain as a new allowed domain, and generate a dedicated Website Push ID and certificate: [Generating the .p12 certificate](/developer/sdk/web/getting-started/safari-setup.md).

### Development environments

While the SDK requires a secure environment on the web, browsers have an exception for `localhost` and `*.localhost` origins where they're considered as secure even though you're using plaintext HTTP to access them. The SDK will detect this and work as expected.

If you do use a secure connection to access your local environment or a preproduction one on the web, please note that granting a temporary security exception using your browser's prompt will **NOT** work as browsers will disable the Push feature.

To fix this:

* For `localhost` connections: either use plaintext `HTTP` or use a tool like [mkcert](https://github.com/FiloSottile/mkcert) to create and install a self signed certificate.
* For remote (such as preproduction) environments: use Let's Encrypt or issue a self signed root CA that you will have to trust on your test computers.

### Showing public identifiers

A modal can be shown on your website to display the following identifiers:

* Installation ID
* Custom User ID
* Push subscription status
* Registration Token

```js
batchSDK('ui.showPublicIdentifiers')
```

![Public identifiers modal screenshot](/files/mpTvfUdhoLikfMfy4gc2)

### Finding your ID

You can find the Installation ID of your device by calling:

```javascript
batchSDK((api) => { 
  api.getInstallationID().then((id) => {
    console.log(id) 
  }) 
})
```

This example directly prints it to your browser's debug console.

{% hint style="success" %}
Tip: In development mode, Batch already prints the installation ID to the console.
{% endhint %}

You can also trigger a modal that displays your Installation ID and your Custom User ID: [Showing public identifiers](#showing-public-identifiers).

### Log your configuration tag

You can log the web push configuration tag in your browser's console by calling:

```javascript
batchSDK((api) => { 
  console.log(api.getConfiguration()) 
})
```

### Debug tool

Batch provides a simple [**debug tool**](https://doc.batch.com/getting-started/features/dashboard/05-settings/01-app-settings#debug-tools) that allows you to test your integration (⚙ Settings → Debug), and send yourself test notifications.

It also shows all the data available for a specific user ID:

* **Token**: Find the token of a specific device.
* **Custom user ID**: Check if your [custom user ID implementation](/developer/sdk/web/profile-data/custom-user-id.md) is working correctly.
* **Native attributes**: See the installation date, last session date, country and more information on a specific user / install.
* **Custom data**: If you send additional data on your users through the [Custom Data API](/developer/api/mep/custom-data-api.md).

![Debug tool](/files/BiUmHHFfyfrityqZ19SD)

### Common issues and integration checklist

If you encounter any issue during your testing, you will likely find an answer in this guide: [How can I test my web push integration?](/developer/technical-guides/how-to-guides/web/how-to-test-my-web-push-integration.md).

It also provides a comprehensive checklist of all elements you should review before going live.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.batch.com/developer/sdk/web/testing-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
