Skip to main content
POST
Token (V2)

Body

Parameters for POST /oauth2/token. Which ones apply depends on grant_type; every value must be a plain string.

grant_type
enum<string>
required

Selects the grant.

Available options:
authorization_code,
refresh_token,
urn:ietf:params:oauth:grant-type:device_code
client_id
string
required

Your app's client ID.

client_secret
string

Apps registered as Server apps & services only. Only needed if you are not using Authorization: Basic. Never ship this inside an app users install.

code
string

authorization_code grant. Single-use, and consumed even by a failed exchange.

code_verifier
string

authorization_code grant. 43 to 128 characters from A-Z a-z 0-9 - . _ ~. A malformed verifier is reported as invalid_grant, the same error as a genuine mismatch.

redirect_uri
string

authorization_code grant. Must match the one used to obtain the code.

refresh_token
string

refresh_token grant.

device_code
string

Device grant. From POST /oauth2/device.

scope
string

refresh_token grant only, and rarely useful: a narrower scope is ignored and a wider one is rejected.

Response

Tokens issued.

RFC 6749 section 5.1 token response. Identical in shape for all three grants.

access_token
string
required

Bearer token, 43 characters, prefixed simkl_at_. Send as Authorization: Bearer ... on every request.

token_type
enum<string>
required

Always the capitalised string Bearer. AUTH V1 returns lowercase bearer, so compare case-insensitively if you support both.

Available options:
Bearer
expires_in
integer
required

Seconds until the access token expires. Always 604800, i.e. 7 days.

Example:

604800

refresh_token
string
required

43 characters, prefixed simkl_rt_. Valid for 180 days, and the window slides forward each time you use it. Non-rotating: the same string is returned every refresh, so store it once.

scope
enum<string>
required

The scope actually granted. Always exactly one of these two values, whatever you asked for. Check it rather than assuming your request was honoured.

Available options:
media:read,
media:read media:write