Skip to main content
POST
Exchange an authorization code or refresh token

Authorizations

Authorization
string
header
required

Client ID and client secret (client_secret_basic, RFC 6749 section 2.3.1).

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required
Available options:
authorization_code,
refresh_token
client_id
string

Required with client_secret_post. Omit with HTTP Basic.

client_secret
string

Required with client_secret_post. Omit with HTTP Basic.

code
string

Required for authorization_code.

redirect_uri
string<uri>

Required for authorization_code.

code_verifier
string

PKCE verifier. Required for authorization_code.

refresh_token
string

Required for refresh_token.

scope
string

Optional narrower scope for the new access token; never expands or mutates the renewable credential.

resource
string<uri>

Not needed. Accepted only for OAuth client libraries that always send a resource indicator (RFC 8707): it must equal https://api.ofauth.com/v3 and is not stored.

Response

Token issued.

access_token
string
required

Opaque access token. Present it only as a Bearer resource credential.

token_type
enum<string>
required
Available options:
Bearer
expires_in
integer
required
Required range: x > 0
Example:

900

refresh_token
string
required

Stable renewable credential bound to this confidential client. Returned on every code exchange and echoed on refresh. Expires after 90 days without successful authenticated refresh.

scope
string
required
Example:

"identity:read profile:read"

authorization_id
string

Informational authorization identifier. Discover accounts through GET /v3/linked-accounts.