# Issue a service account access token **POST /api/v1/oauth/token** Exchanges a service account client ID and secret for a short-lived bearer token. Only grant_type=client_credentials is supported. ## Servers - https://agentengine.mongodb.com: https://agentengine.mongodb.com () ## Authentication methods - Bearer auth ## Parameters ### Body: application/json (object) OAuth token request. Prefer HTTP Basic auth for client credentials. - **client_id** (string) ClientID may also be sent as the HTTP Basic username (preferred). - **client_secret** (string) ClientSecret may also be sent as the HTTP Basic password (preferred). - **grant_type** (string) GrantType must be "client_credentials". ## Responses ### 200 OK #### Body: application/json (object) - **access_token** (string) - **expires_in** (integer) - **token_type** (string) ### 400 Bad Request #### Body: application/json (object) - **error** (string) - **error_description** (string) ### 401 Unauthorized #### Body: application/json (object) - **error** (string) - **error_description** (string) ### 429 Too Many Requests #### Headers - **Retry-After** (string) Seconds to wait before retrying #### Body: application/json (object) - **error** (string) - **error_description** (string) ### 500 Internal Server Error #### Body: application/json (object) - **error** (string) - **error_description** (string) [Powered by Bump.sh](https://bump.sh)