Authenticate the CLI with your account
To associate the Snyk CLI for use with your Snyk account, you must first authenticate your machine. No repository permissions are needed at this stage, only your email address. When you have authenticated, you can get started using the CLI.
You can authenticate:
- Using your API token
- Using the
SNYK_TOKEN
environment variable; see Configure the Snyk CLI. UseSNYK_TOKEN
in a CI/CD environment.
To authenticate using your API token:
- 1.
- 2.In the KEY field, click click to show; then select and copy your API token. A screenshot follows.
- 3.In the CLI, run
snyk auth [<API_TOKEN>]
orsnyk config set api=<token>
. The<API_TOKEN>
is validated by the Snyk API.

Snyk Account Settings, API Token
Last modified 5d ago