Skip to content
Registry StackDocsDevelopment (unreleased)

Redeem one pre-authorized code anonymously

POST
/token
curl --request POST \
--url https://example.com/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code \
--data pre-authorized_code=example \
--data tx_code=example
Media typeapplication/x-www-form-urlencoded
object
grant_type
required
Allowed value: urn:ietf:params:oauth:grant-type:pre-authorized_code
pre-authorized_code
required
string
tx_code
string
/^[0-9]{6}$/

Single-use access token

Media typeapplication/json
object
access_token
required
string
expires_in
required
integer
>= 60 <= 900
token_type
required
Allowed value: Bearer

Example

{
"token_type": "Bearer"
}
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The grant or code was refused

Media typeapplication/json
object
error
required
Allowed values: invalid_request invalid_token unsupported_grant_type invalid_grant invalid_credential_request invalid_proof invalid_nonce credential_request_denied temporarily_unavailable server_error
error_description
required
string

Example

{
"error": "invalid_request"
}
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The configured request deadline elapsed

Media typeapplication/json
object
error
required
Allowed values: invalid_request invalid_token unsupported_grant_type invalid_grant invalid_credential_request invalid_proof invalid_nonce credential_request_denied temporarily_unavailable server_error
error_description
required
string

Example

{
"error": "invalid_request"
}
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The request body exceeds the configured byte limit

Media typetext/plain; charset=utf-8
string
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The request is not form encoded

Media typetext/plain; charset=utf-8
string
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The form body cannot be decoded

Media typetext/plain; charset=utf-8
string
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache

The bounded state store is unavailable

Media typeapplication/json
object
error
required
Allowed values: invalid_request invalid_token unsupported_grant_type invalid_grant invalid_credential_request invalid_proof invalid_nonce credential_request_denied temporarily_unavailable server_error
error_description
required
string

Example

{
"error": "invalid_request"
}
Cache-Control
string
Allowed value: no-store
Pragma
string
Allowed value: no-cache