Authentication to use the Broadcast API

In order to use the Broadcast API, you need to get an Access Token (API Key).

Creating an Access Token

By default, Broadcast creates an Access Token when you install the application.

This initial Access Token is set up so that you can send transactional emails.

However, you can create an unlimited number of additional Access Tokens, each with their own scope of permissions.

Here are the different scopes you can set for an Access Token:

  • List and read broadcasts (Read)
  • Send and update broadcasts (Write)
  • List and read transactional emails (Read)
  • Send transactional emails (Write)
  • List and read subscribers (Read)
  • Create and update subscribers (Write)
  • List and read subscribers in sequences (Read)
  • Add or remove subscribers from sequences (Write)

The labeling of the scopes should be self-explanatory.

Whenever possible, create a new access token with the exact permissions you need and not more

Using an Access Token

All requests to the Broadcast API need to include the Access Token in the HTTP header.

To use an Access Token, you need to include it in the Authorization header of your HTTP requests:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

If your Access Token tries to make a request that it is not authorized to make, you will get a 401 (Unauthorized) response code.

Managing Your Access Tokens

To view and manage your Access Tokens, click on Access Tokens in the left sidebar of the dashboard.

Refreshing Access Tokens

By default, any access token you create does not expire.

You can refresh (regenerate) an Access Token at any time. This will create a new token value while maintaining the same permissions.

Important

When you refresh an Access Token, the old token value becomes invalid immediately. Any applications or integrations using the old token will stop working until you update them with the new token value.

To refresh an Access Token:

  1. Click on the token you want to refresh from the Access Tokens list
  2. Click the Refresh token button
  3. Confirm that you want to refresh the token
  4. Copy the new token value and update your applications

Always ensure you have updated all your integrations with the new token value before refreshing.