Exchange authorization code for auth tokens.
POST
/api/auth/v1/token
const url = 'https://example.com/api/auth/v1/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"authorization_code":"example","pkce_code_verifier":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/v1/token \ --header 'Content-Type: application/json' \ --data '{ "authorization_code": "example", "pkce_code_verifier": "example" }'This API endpoint is meant for client-side applications (SPA, mobile, desktop, …) using the web-auth flow.
Request Body required
Section titled “Request Body required ” Media type application/json
object
authorization_code
string | null
pkce_code_verifier
string | null
Example generated
{ "authorization_code": "example", "pkce_code_verifier": "example"}Responses
Section titled “ Responses ”Converts auth & pkce codes to tokens.
Media type application/json
object
auth_token
required
string
csrf_token
required
string
refresh_token
required
string
Example generated
{ "auth_token": "example", "csrf_token": "example", "refresh_token": "example"}