# Setting up authentication

> Create a sandbox token and send it with every tracking request.

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.

For the purposes of this guide, use a sandbox token from the [API settings page in the dashboard](https://dashboard.mothership.com/settings/api) and put it in an environment variable.

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

Every request you make in the sandbox environment must include this token in the `Authorization` header.

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

For production requests, create a production token on the same page. If the API page isn't in your dashboard settings, contact [developers@mothership.com](mailto:developers@mothership.com) to request API access.