Complete hosted platform OAuth callback

GET /auth/oauth/callback

Public browser callback for PLATFORM_OAUTH_REDIRECT_URI. Validates state and browser-binding cookie, exchanges the code, reconciles Atlas roles when applicable, and either resumes Agent Engine OIDC login or redirects to the in-app next path.

Query parameters

  • state string Required

    Opaque pending-grant state

  • code string

    Authorization code

  • error string

    Authorization-server error

  • error_description string

    Authorization-server error description

Responses

  • 302 application/json

    Redirect to Agent Engine OTC callback, in-app next, or coarse error destination

  • 409 application/json

    Authorization or login finalization already in progress

  • 503 application/json

    Platform OAuth not configured

GET /auth/oauth/callback
curl \
 --request GET 'https://agentengine.mongodb.com/auth/oauth/callback?state=string' \
 --header "Authorization: $API_KEY"
Response examples (302)
string
Response examples (409)
string
Response examples (503)
string