OAuth2 API
Last updated
Was this helpful?
Last updated
Was this helpful?
Snyk provides an OAuth2 API, primarily for use with Snyk Apps. It complies with RFC 6749.
Most endpoints are served from the Snyk API subdomain (for example, https://api.snyk.io), with the one exception being /oauth2/authorize
which is served on the main app subdomain (for example, https://app.snyk.io).
Revokes an otherwise valid refresh token so it can't be reused. This is used when a refresh token is accidentally, or maliciously, leaked.
/revoke
The client ID of the client application.
64ae3415-5ccd-49e5-91f0-9101a6793ec2
The client secret of the client application.
super_secret_client_secret
The refresh token to be revoked.
some_opaque_refresh_token_string
No body
To be called by the end user to authorize the client application to their Snyk organizations. Success returns a redirect to the provided redirect_uri
, containing an authorization code which can be exchanged for an access token.
/oauth2/authorize
The type of authorization flow being used. Only "code" is supported for authorization code flow.
code
code
The client ID of the client application.
64ae3415-5ccd-49e5-91f0-9101a6793ec2
The redirection URI to which the authorization server will redirect the user after granting or denying authorization. Must match one of the URIs set on the client application exactly.
https://example.com/callback
An opaque value used by the client to maintain state between the authorization request and the authorization callback. Use this value to match client callbacks to the request that spawned them.
random_state_value
A cryptographically secure code challenge derived from a secret code verifier you generate on the client-side as defined in [RFC7636]. It is generated from a hashing a randomly generated string, the code_verifier
used when exchanging tokens, then URL safe base 64 encoding the result.
YWVjMDcwNjQ1ZmU1M2VlM2IzNzYzMDU5Mzc2MTM0ZjA1OGNjMzM3MjQ3Yzk3OGFkZDE3OGI2Y2NkZmIwMDE5Zg
The method used to derive the code challenge from the code verifier, only S256 is supported.
S256
S256
No body