How to obtain and use your Snyk API token
If you are using Snyk on the EU and AU tenants, you must set your endpoints accordingly before authenticating. For more information, see Regional hosting and data residency.
How to obtain your personal Snyk API token
Follow these steps to obtain your personal Snyk API token:
Log in to Snyk and from the pull-down menu under your username, choose Account settings > General.
In the Account Settings, select General > Auth Token.
In the KEY field, click to show and then select and copy your API token.
Copy the token and save it in a secure location for future use.
How to use your Snyk API token
Your Snyk API token is a personal token available under your user profile. The Snyk API token is associated with your Snyk Account and not with a specific Organization.
Free, Team, and Trial plan users have access only to this personal token under the user profile. The personal token can be used to authenticate with:
The Snyk CLI running on a local or a build machine
An IDE, when setting a token manually
A CI/CD integration
Enterprise users have access to a personal token under their profile and to service account tokens. For details, see Service accounts.
Enterprise users should use a service account to authenticate for any kind of automation. This includes, but is not limited to, CI/CD scanning with the CLI or build system plugins and automations, including the API.
Enterprise users should use the personal token under their user profile for:
Running the CLI locally on their machine
Authenticating with the IDE manually
Running API calls one time, for example, to test something
For more information on the personal Snyk API token, see the following pages: Authenticate to use the CLI and Authentication for API.
Last updated