Exchange an authorization code for an access token. Use this endpoint after the user authorizes your app and you receive an authorization code.
Request structure
curl -X POST https://api.cloud.blnkfinance.com/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-d "grant_type=authorization_code" \
-d "code=THE_CODE_FROM_REDIRECT" \
-d "redirect_uri=https://your-app.com/oauth/callback"
Basic authentication using your OAuth client ID and client secret. Format: Basic base64(client_id:client_secret) or use -u flag in cURL.
Must be authorization_code for this flow.
The authorization code received from the OAuth redirect after user authorization.
The redirect URI that was used in the authorization request. Must match exactly.
Response structure
{
"access_token": "blnk_at_...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "blnk_rt_...",
"scope": "data:read data:write proxy:write"
}
The access token to use for authenticating API requests. Include in the Authorization: Bearer <access_token> header.
Always Bearer for access tokens.
Number of seconds until the access token expires.
Token used to obtain a new access token when the current one expires.
Space-separated list of scopes granted to this token.
Need help?
If you’re having trouble with Blnk Cloud, don’t hesitate to send us a message via email at [email protected] or send us a message here.