To use the Snyk API, you must get your API token from Snyk. You can find your token in your General Account Settings after you register with Snyk and log in.

When using the API directly, provide the API token in an Authorization header, in the following example request, replacing API_TOKEN with your API Token

curl --request GET \
--url "" \
--header "Content-Type: application/vnd.api+json" \
--header "Authorization: token API_TOKEN"

If you are using the API through Snyk Apps, provide the access_token in an Authorization header preceded by bearer as follows:

Authorization: bearer ACCESS_TOKEN

Otherwise, a 401 Unauthorized response will be returned:

HTTP/1.1 401 Unauthorized

    "status": "401",
    "code": "Unauthorized"

For more details and for information about using personal tokens versus service account tokens, see How to obtain and authenticate with your Snyk API token.

For additional information, see Revoking and regenerating Snyk API tokens.

Last updated

More information

Snyk privacy policy

© 2023 Snyk Limited | All product and company names and logos are trademarks of their respective owners.