# Authentication for API

To use the Snyk API, you must first get your API token from Snyk.

1. Go to the **General Account Settings** in [your Snyk account](https://app.snyk.io/account).
2. In the KEY field, **click to show** and then select and copy your API token. Refer to the screenshot that follows.
3. To use the Snyk API, supply the token in an `Authorization` header, preceded by `Token`:\
   `Authorization: Token API_KEY`

For more information about authentication, refer to the overview in the [API reference docs](https://apidocs.snyk.io/). For additional information see [Revoking and regenerating Snyk API tokens](/~/changes/m2hJeDrttXy2N83AnRjM/snyk-api-info/revoking-and-regenerating-snyk-api-tokens.md).

![Get API token](/files/d0F3T8SlrI76Dmmw9lOn)


---

# 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://docs.snyk.io/~/changes/m2hJeDrttXy2N83AnRjM/snyk-api-info/authentication-for-api.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.
