Exchange Authorization Code
Exchanges a short-lived authorization code (obtained from /oauth/authorize) or a refresh_token for a store-scoped access_token (blnk_live_... or blnk_test_...).
Supports both application/json and application/x-www-form-urlencoded request bodies, as well as HTTP Basic Authentication (Authorization: Basic base64(client_id:client_secret)) and PKCE (code_verifier).
Supported Grant Types:
authorization_code: Exchange a 5-minute single-usecodefor anaccess_tokenandrefresh_token.refresh_token: Rotate an existingrefresh_tokenfor a newaccess_tokenandrefresh_tokenpair.
Body
Must be authorization_code when exchanging a code from /oauth/authorize, or refresh_token when rotating tokens.
authorization_code, refresh_token "authorization_code"
Your OAuth application's Client ID (blnk_client_...).
"blnk_client_c35awnC5stJvE1aMvZYHMBpH"
Your OAuth application's Client Secret (blnk_secret_...). Required unless using PKCE without a client secret.
"blnk_secret_Yje9xK2mPqL8vN4rT6wZ1aB3cD5eF7gH9iJ0kL"
The 5-minute single-use authorization code (blnk_code_...) received at your redirect_uri. Required when grant_type=authorization_code.
"blnk_code_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c"
The exact redirect_uri used during the /oauth/authorize request.
"https://partner.com/oauth/blink/callback"
Optional PKCE code verifier matching the code_challenge sent to /oauth/authorize.
The refresh token (blnk_rt_...) to rotate. Required when grant_type=refresh_token.
Response
Successfully issued or rotated OAuth access token.
The store-scoped Bearer token used to call /api/v1/* endpoints. Does not expire unless revoked or rotated.
"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"
"Bearer"
Refresh token (blnk_rt_...) that can be used with grant_type=refresh_token to rotate the access token.
"blnk_rt_z9y8x7w6v5u4t3s2r1q0p9o8n7m6l5k4j3i2h1g0"
Space-separated list of granted scopes (or * for full store access).
"products:read orders:read webhooks:write"