Anton.Docs
Dashboard (opens in a new tab)
API referenceAuthentication

Mint a DPoP-bound access token

POST/oauth/token

Walked through inAuthenticationSend your first payout

Exchange (client_id, client_secret) plus a DPoP proof for an OAuth 2.0 access token bound to your registered DPoP keypair. RFC 6749 §4.4 (client_credentials) + RFC 9449 §5.

Send credentials with HTTP Basic auth (Authorization: Basic <base64(client_id:client_secret)>). The body is also accepted. The DPoP header is required and MUST carry a proof JWT signed with your private DPoP key, with htm=POST, htu=https://api.../oauth/token, a fresh iat and jti, and NO ath claim (the access token does not exist yet).

A token lasts 1 hour in production and 8 hours in sandbox. There are no refresh tokens: call POST /oauth/token again for a fresh token.

Headers

DPoPstring · required

DPoP proof JWT for this token request.

Body application/x-www-form-urlencoded

grant_typestring · required
client_credentials
client_idstring

Optional when supplied via Basic auth header.

client_secretstring

Optional when supplied via Basic auth header.

Responses

200Access token minted.
access_tokenstring · required

Signed JWT to send as Authorization: DPoP <token>.

token_typestring · required
DPoP
expires_ininteger · required

Token lifetime in seconds.

scopestring · required

Space-delimited granted scopes (RFC 6749 §3.3). They echo your credential's grants and match the values in the access token's scope claim, for example payouts intelligence.

400Invalid request, unsupported_grant_type, or invalid DPoP proof.
errorstring · required
invalid_requestinvalid_clientinvalid_grantunauthorized_clientunsupported_grant_typeinvalid_scopeinvalid_dpop_proofinvalid_tokenserver_error
error_descriptionstring
401`invalid_client`: the `client_id` is unknown or the secret is wrong. The response carries the `WWW-Authenticate` header (RFC 6749 section 5.
errorstring · required
invalid_requestinvalid_clientinvalid_grantunauthorized_clientunsupported_grant_typeinvalid_scopeinvalid_dpop_proofinvalid_tokenserver_error
error_descriptionstring
403Test client used in production.
errorstring · required
invalid_requestinvalid_clientinvalid_grantunauthorized_clientunsupported_grant_typeinvalid_scopeinvalid_dpop_proofinvalid_tokenserver_error
error_descriptionstring

Something wrong or missing here? Open an issue (opens GitHub in a new tab) ↗