Dexter
Dexter
Docs

Connector OAuth

POST /api/connector/oauth/token exchanges OAuth authorization codes or refresh tokens for Supabase sessions. This is how Claude, ChatGPT, and other connectors authenticate through Dexter.

Request

URL: https://api.dexter.cash/api/connector/oauth/token

Content-Type: application/json or application/x-www-form-urlencoded

Authorization Code Grant

{
  "grant_type": "authorization_code",
  "code": "abc123...",
  "code_verifier": "pkce_verifier_string"
}
FieldTypeRequiredDescription
grant_typestringYes"authorization_code"
codestringYesAuthorization code from the OAuth exchange
code_verifierstringIf PKCE was usedS256 PKCE verifier

Refresh Token Grant

{
  "grant_type": "refresh_token",
  "refresh_token": "v1.xxx..."
}

Response (200)

{
  "token_type": "bearer",
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "v1.abc123...",
  "expires_in": 1800,
  "supabase_user_id": "550e8400-e29b-41d4-a716-446655440000",
  "wallet_public_key": "BRANCHVDL53igBiYuvrEfZazXJm24qKQJhyXBUm7z7V",
  "dexter_mcp_jwt": "eyJhbGciOiJIUzI1NiIs..."
}
FieldTypeDescription
token_typestringAlways "bearer"
access_tokenstringSupabase access token
refresh_tokenstringSupabase refresh token
expires_innumberTTL in seconds
supabase_user_idstringSupabase user UUID
wallet_public_keystringSolana public key (if wallet assigned)
dexter_mcp_jwtstringMCP JWT for Dexter tools (optional)

Errors

StatusErrorWhen
400invalid_requestMissing code or refresh_token
400invalid_grantInvalid/consumed code, or PKCE verification failed
400unsupported_grant_typeGrant type not authorization_code or refresh_token

On this page