# Setting up authentication

> Create a token for the webhook configuration requests in this guide.

As outlined in the [authentication reference docs](https://developers.mothership.com/reference/authentication), the Mothership API handles authenticating requests via a `Bearer` token in the request's `Authorization` header.

Create a token on the [API settings page in the dashboard](https://dashboard.mothership.com/settings/api) and put it in an environment variable. The examples in this guide read it from there.

```shell
export MOTHERSHIP_API_TOKEN="your API token"
```

Every request must include this token in the `Authorization` header.

```http
Authorization: Bearer {API_TOKEN_GOES_HERE}
```

> [!NOTE] Use production to test delivery
> The sandbox accepts webhook configuration requests, but it doesn't store configurations or send webhooks. To receive real events, create the configuration with a production token.