前端或 CLI 调用此终结点,并传递从 OIDC 回调接收的一次性代码,以获取本地 JSON web token 访问和刷新令牌。
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"
}'
请求示例
{
"code": "string",
"code_verifier": "string"
}
响应示例 (200)
{
"access_token": "string",
"atlas_connection_status": "connected",
"refresh_token": "string",
"token_type": "string"
}
响应示例 (400)
{}
响应示例 (401)
{}
响应示例 (503)
{}