Exchange access code
OAuth2
Exchange Code
Exchanges an authorization code for an API key.
GET
Exchange access code
Overview
Exchange an authorization code for a JWT API key. This is the final step in the OAuth2 flow, converting the temporary code into a permanent access token.This endpoint requires the
X-OAuth2-Client-Secret header for authentication instead
of the standard Authorization header.Path Parameters
Headers
Response
data field contains a JWT API key that you can use to make authenticated API requests.
Using the API Key
Include the JWT as a Bearer token in subsequent API requests:Token Properties
The JWT API key:- Grants access only to the stores the user authorized
- Has permissions limited to the scopes you requested and the user approved
- Does not expire until the user revokes authorization
- Is tied to the specific user and application
Error Responses
Complete Flow Example
Authorizations
Your API key goes here
Path Parameters
The application ID.
The authorization code to exchange.
Response
The object was successfully returned.
Represents a default generic response for API endpoints.
Indicates whether the operation or response was successful.
A descriptive message providing additional context or information about the response.
The error code (if there was an error) to use when referencing the error
Represents the data associated with a response.
Last modified on July 31, 2026