发布 /auth/token

使用用户用户名和密码对用户进行身份验证,并返回 JWT 令牌对。

应用程序/x-www-form-urlencoded
body 字符串 必需

用户名 |密码

响应

  • 200 application/json

    正常

    隐藏响应属性 显示响应属性 对象
    • access_token 字符串
    • refresh_token 字符串
    • token_type 字符串
  • 400 application/json

    Bad Request

    允许使用其他属性。

  • 401 application/json

    Unauthorized

    允许使用其他属性。

  • 500 application/json

    内部服务器错误

    允许使用其他属性。

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