Obtain a session access token

POST /auth/session

Responses

  • 201 application/json

    Successfully created.

    Hide response attribute Show response attribute object
    • access_token string
  • 401 application/json

    Invalid token

    Hide response attributes Show response attributes object
    • error string

      A message that describes the error.

      Value is invalid refresh token: incorrect token type.

    • error_code string

      The error type.

POST /auth/session
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/auth/session' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (201)
{
  "access_token": "string"
}
Response examples (401)
{
  "error": "invalid refresh token: incorrect token type",
  "error_code": "string"
}