Get tokens
The OAuth 2.1 token endpoint, form-encoded. authorization_code (with PKCE: code, code_verifier, redirect_uri, client_id, and the device’s name as device_name) for an app signing a person in; refresh_token (with client_id) to get new tokens, each refresh token usable once; client_credentials for a server, authenticated with HTTP Basic. Errors are OAuth’s own shape, not problem+json.
The token request, form-encoded
application/x-www-form-urlencoded- body
The token request, form-encoded
grant_type*stringauthorization_code, refresh_token or client_credentials
code?stringauthorization_code: the code from /oauth/authorize
length <= 200code_verifier?stringauthorization_code: the PKCE verifier
length <= 200redirect_uri?stringauthorization_code: exactly as sent to /oauth/authorize
length <= 500client_id?stringauthorization_code and refresh_token: your app’s client ID
length <= 200device_name?stringauthorization_code: the device’s name, shown in Account › Devices
length <= 200refresh_token?stringrefresh_token: the refresh token, used once
length <= 200scope?stringclient_credentials: fewer scopes than the client holds, space-separated
length <= 1000Tokens (RFC 6749 §5.1)
application/json- response
Tokens (RFC 6749 §5.1)
access_token*stringOpaque; send it as Authorization: Bearer …
token_type*"Bearer""Bearer"expires_in*integerSeconds until the access token expires: 900
-9007199254740991 <= value <= 9007199254740991refresh_token?stringFor an app acting for a person; each use returns a new one, and the old one must never be used again
scope*stringThe scopes granted, space-separated
curl -X POST 'https://api.sign2approve.com/v1/auth/token' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'grant_type=string'{ "access_token": "s2a_live_uk_9xQ…", "token_type": "Bearer", "expires_in": 900, "refresh_token": "s2a_live_uk_Hk2…", "scope": "me:read documents:envelopes:read"}