- 1 Minute to read
- Print
- DarkLight
exchange a grant code or refresh token for a JWT
- 1 Minute to read
- Print
- DarkLight
This allows the client to exchange a previously obtained grant code or refresh token for an access token for immediate use and a refresh token for subsequent requests.
It may return an updated refresh token, in which case the stored refresh token should be updated
The redirect URI must be set to urn:ietf:wg:oauth:2.0:oob:auto
When exchanging a grant code from the authorize endpoint:
- set grant_type to authorization_code
- set code to the code returned by the authorize endpoint
When refreshing a token:
- set grant_type to refresh_token
- set refresh_token to the previously obtained refresh token
The JWT for the user
the authorization_code previously obtained
the refresh_token previously obtained
the api client id supplied by dressipi
for authorization_code requests, the code_verifier that was used to generate the associated code_challenge
The generated tokens
This allows the client to exchange a previously obtained grant code or refresh token for an access token for immediate use and a refresh token for subsequent requests.
It may return an updated refresh token, in which case the stored refresh token should be updated
The redirect URI must be set to urn:ietf:wg:oauth:2.0:oob:auto
When exchanging a grant code from the authorize endpoint:
- set grant_type to authorization_code
- set code to the code returned by the authorize endpoint
When refreshing a token:
- set grant_type to refresh_token
- set refresh_token to the previously obtained refresh token
The access token for the user
The refresh token for the user
The lifetime of the token, in seconds
The access_token type (this will always be Bearer)
oauth2 error
Generic oauth error object
The error code (one of the error codes defined by https://tools.ietf.org/html/rfc6749#section-4.1
A human readable description of the error