POST /auth/token

Authenticates a user with username and password and returns a JWT token pair.

application/x-www-form-urlencoded
Body string Required

Username | Password

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • access_token string
    • refresh_token string
    • token_type string
  • 400 application/json

    Bad Request

    Additional properties are allowed.

  • 401 application/json

    Unauthorized

    Additional properties are allowed.

  • 500 application/json

    Internal Server Error

    Additional properties are allowed.

POST /auth/token
curl \
 --request POST 'https://agentengine.mongodb.com/auth/token' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 
Response examples (200)
{
  "access_token": "string",
  "refresh_token": "string",
  "token_type": "string"
}
Response examples (400)
{}
Response examples (401)
{}
Response examples (500)
{}