Skip to main content
POST
Exchange a code for a key

Body

grant_type
string
required
Allowed value: "authorization_code"
code
string
required

The code Sonder sent to your redirect_uri.

redirect_uri
string
required

Exactly the one you sent the author with.

client_id
string

Or send it with HTTP Basic auth.

client_secret
string

Or send it with HTTP Basic auth.

code_verifier
string

Required if you sent a code_challenge (PKCE).

Response

An API key for this author.

access_token
string
required

An API key. Store it like a password; it does not expire, and the author can revoke it in Sonder.

token_type
string
required
Allowed value: "Bearer"
scope
string
required
Allowed value: "read"
account
object
required