---
title: "Authenticate as an App Services administrator"
method: POST
path: "/auth/providers/mongodb-cloud/login"
tags: ["admin"]
---

# 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](#get-an-admin-api-session-access-token).

## Request body

- object
  - `username` string, required
  - `apiKey` string, required

## Response `200`

Authentication was successful.

- object
  - `access_token` string — An access token you may provide in the `Authorization` header of API requests. [The App Services API Authentication section](#section/Get-Authentication-Tokens) demonstrates how to use this token.
  - `refresh_token` string — A refresh token you may provide in the `Authorization` header of [POST auth/session](#section/adminCreateSession) 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

---

[API](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/1365ab72bc03/schema)
