Skip to content

Exchange code for tokens

POST/oauth/token

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Exchange an authorization code for access and refresh tokens (authorization_code grant), or refresh an expired access token (refresh_token grant). Uses PKCE verification — no client secret required.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"grant_type": "authorization_code",
"code": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"code_verifier": "<string>"
}'

Try it

Body application/json
POST

Request body

application/jsonrequired

  • bodyobject | objectrequired
    Authorization Code Exchange
    • grant_typestringrequired
      Allowed values
      "authorization_code"
    • codestringrequired
    • redirect_uristringrequired
    • client_idstringrequired
    • code_verifierstringrequired

      PKCE code verifier

    Refresh Token
    • grant_typestringrequired
      Allowed values
      "refresh_token"
    • refresh_tokenstringrequired
    • client_idstringrequired
{
"grant_type": "authorization_code",
"code": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"code_verifier": "<string>"
}

Responses

200application/json

Tokens issued

  • access_tokenstring
  • token_typestring
    Example
    "Bearer"
  • expires_ininteger
    Example
    3600
  • refresh_tokenstring
  • scopestring

400

Invalid grant or parameters

Response examples

{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "<string>",
"scope": "<string>"
}

Get release notes by email

A short digest on the days something new goes live — each change with a link to its note in the release notes. No marketing, and one click to stop.

Company email addresses only. We’ll send one email to confirm it’s you. Already use Sessionboard? You can also turn this on under Community → What’s new.