# Authentication

Use a personal API token for endpoints that authenticate as your snapAddy user. Check the endpoint’s [API reference](/api-reference/) for the required header.

## Personal API token

1. Sign in to the snapAddy dashboard and open [Profile → Security](https://app.snapaddy.com/settings/security).
2. Under **API token**, copy your existing token or select **Generate API token** to create one.
3. Store the token in your integration’s secret store. In the examples, `SNAPADDY_API_KEY` is the environment variable that supplies it.

The token authenticates as the user who created it. That user’s organization, role, and resource access determine which requests can succeed. [API token setup in the Knowledge Base](https://portal.snapaddy.com/knowledge/how-do-i-generate-the-api-token)

Send the token in `x-api-key: <token>` when the endpoint specifies `x-api-key`. A missing or invalid token returns `401`. A valid token without the required role or access returns `403`. See [errors, pagination, and limits](/errors-and-limits/) for error bodies, rate limits, and usage quotas.

## Run the examples

Choose cURL, TypeScript, or Python above a request. The guides use Node.js 24 or later for TypeScript and Python 3 with its standard library. Run authenticated requests on your server or in your terminal so the key stays private.
