POST /auth/token

Exchange client credentials for access token using OAuth2 Client Credentials Grant

application/json

Body Required

  • clientId string Required
  • clientSecret string Required

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • accessToken string Required
    • tokenType string Required
    • expiresIn integer Required
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
POST /auth/token
curl \
 --request POST 'http://api.example.com/auth/token' \
 --header "Content-Type: application/json" \
 --data '{"clientId":"string","clientSecret":"string"}'
Request examples
{
  "clientId": "string",
  "clientSecret": "string"
}
Response examples (200)
{
  "accessToken": "string",
  "tokenType": "string",
  "expiresIn": 42
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}