issueOAuthTokens
POST
/api/v1/oauth/token
const url = 'https://example.com/api/v1/oauth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"grant_type":"authorization_code","client_id":"example","code":"example","redirect_uri":"https://example.com","code_verifier":"example","refresh_token":"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/v1/oauth/token \ --header 'Content-Type: application/json' \ --data '{ "grant_type": "authorization_code", "client_id": "example", "code": "example", "redirect_uri": "https://example.com", "code_verifier": "example", "refresh_token": "example" }'Public and rate-limited. Exchanges a single-use code with its PKCE verifier, or rotates a refresh token. PKCE is the client authentication for loopback clients. Reusing a rotated refresh token revokes the whole grant.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
grant_type
required
string
client_id
string
code
string
redirect_uri
string format: uri
code_verifier
string
refresh_token
string
Responses
Section titled “ Responses ”Opaque access and refresh tokens
Media typeapplication/json
object
data
required
object
access_token
required
string
refresh_token
required
string
token_type
required
string
expires_at
required
string format: date-time
Example
{ "data": { "token_type": "Bearer" }}Expired, used, mismatched, or revoked grant
Too many authentication attempts