Authenticate as an App Services administrator

POST /auth/providers/mongodb-cloud/login

Authenticate as an App Services administrator using an Atlas programmatic API key pair. To learn more, see Get An Admin API Session Access Token.

application/json

Body Required

  • username string Required
  • apiKey string Required

Responses

  • 200 application/json

    Authentication was successful.

    Hide response attributes Show response attributes object
    • access_token string

      An access token you may provide in the Authorization header of API requests. The App Services API Authentication section demonstrates how to use this token.

    • refresh_token string

      A refresh token you may provide in the Authorization header of POST auth/session to obtain a new access_token for the current user session.

    • user_id string

      The unique _id value of the MongoDB Cloud user.

    • device_id string
POST /auth/providers/mongodb-cloud/login
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login' \
 --header "Content-Type: application/json" \
 --data '{"username":"string","apiKey":"string"}'
Request examples
{
  "username": "string",
  "apiKey": "string"
}
Response examples (200)
{
  "access_token": "string",
  "refresh_token": "string",
  "user_id": "string",
  "device_id": "string"
}