Skip to content
Insy
For developers
Esc
navigateopen⌘Jpreview

Token

POST/oauth/token
Request body
requiredapplication/json
grant_typestringrequired
OAuth2 grant type.
Allowed:authorization_coderefresh_token
client_idstringrequired
client_secretstring
Required for confidential clients. Public clients send a code_verifier instead.
codestring
Required when grant_type is 'authorization_code'.
redirect_uristring
Required when grant_type is 'authorization_code'. Must match the redirect URI given with code.
refresh_tokenstring
Required when grant_type is 'refresh_token'.
code_verifierstring
PKCE verifier (RFC 7636). Required when the code was issued with a challenge, which is always the case for public clients.
min length 43 · max length 128
Responses
200Access and refresh tokens
access_tokenstringrequired
refresh_tokenstringrequired
token_typestringrequired
expires_innumberrequired
Access token lifetime in seconds
scopestringrequired
Try it
Server
Bodyapplication/json
Request
curl -X POST "https://api.insy.io/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "authorization_code",
  "client_id": "string",
  "client_secret": "string",
  "code": "string",
  "redirect_uri": "string",
  "refresh_token": "string",
  "code_verifier": "stringstringstringstringstringstringstrings"
}'
Response
{
  "access_token": "Qdo7OGjdzi9iurSsag6BInEIPiHp-yFIDTkpQG4nAFU",
  "refresh_token": "Jp36TmRIf7IvKKcUdRanxDH1WNOqKIuaZUp2OcgksAA",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "memberships.read"
}