Set up the refresh token exchange
As the access_token will expire in a short time, the App will need to frequently request a new one using the refresh_token. This must be done while the refresh_token itself is still valid.
To exchange for a fresh access_token, make a POST request to the token endpoint (more details found in the API documentation):
1
https://api.snyk.io/oauth2/token
Copied!
as the refresh_token grant type, with the following properties in the request body:
1
{
2
grant_type: refresh_token,
3
client_id: clientId - from when the app was created,
4
client_secret: clientSecret - from when the app was created,
5
refresh_token: refresh_token - from the previous step
6
}
Copied!
The response to this call provides a new access_token, refresh_token, and expiry for each.
Last modified 7d ago
Export as PDF
Copy link
Edit on GitHub