Exchange IDP Code for Tokens
Exchanges a one-time code (received from the IDP callback redirect) for access and refresh tokens.
After the IDP callback flow completes, GIS redirects to the client's redirect_uri with a code parameter.
The client then calls this endpoint to exchange that code for tokens.
Flow:
- After IDP authentication, client receives
redirect_uri?code=<one_time_code> - Client calls
POST /api2/idp/tokenwith the code and client ID - GIS validates the code, resolves the guest identity, and issues tokens
The one-time code expires after a short period (typically 60 seconds) and can only be used once.
- Type: stringX
- Correlation - Id Optional caller-provided correlation ID; echoed in responses when present.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json
Request body containing the one-time code and client identifier.
- Type: stringclientrequired
OAuth client ID provided by the business and configured with the Advance Auth scope. Required to identify the client application for authentication.
- Type: stringcoderequired
One-time code received from the IDP callback redirect. Expires after approximately 60 seconds and can only be used once.
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE/api2/idp/token \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client": "",
"code": ""
}'
{
"data": {
"access_token": "ACCESS_TOKEN_GOES_HERE",
"refresh_token": "REFRESH_TOKEN_GOES_HERE",
"expires_in": 86400,
"token_type": "Bearer"
}
}