OAuth

Exchange a code for a token

POST/v1/oauth/token

Exchanges an authorization code for a connection access token. If your application is public, send client_id in the form body, plus the PKCE code_verifier when you sent a code_challenge on the auth link. If it's confidential, authenticate with HTTP Basic client_id:client_secret. The token is long-lived and doesn't refresh; issuing a new one for the same connection revokes the previous one. An invalid, expired, or used code returns 400 invalid_grant.

Authorization

clientBasic
AuthorizationBasic <token>

client_id:client_secret for confidential applications.

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/oauth/token" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'grant_type=authorization_code&code=string&redirect_uri=http%3A%2F%2Fexample.com'
{  "access_token": "string",  "token_type": "Bearer",  "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"}