The frontend or CLI calls this endpoint with a one-time code received from the OIDC callback to obtain local JWT access and refresh tokens.
POST
/auth/oidc/exchange
curl \
--request POST 'https://agentengine.mongodb.com/auth/oidc/exchange' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"code": "string",
"code_verifier": "string"
}'
Request examples
{
"code": "string",
"code_verifier": "string"
}
Response examples (200)
{
"access_token": "string",
"atlas_connection_status": "connected",
"refresh_token": "string",
"token_type": "string"
}
Response examples (400)
{}
Response examples (401)
{}
Response examples (503)
{}