Skip to main content

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

Server-Side Only: This request must be made from your backend server, never from client-side code. The client secret must remain confidential.

Response

The 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

Last modified on July 31, 2026