Войти в ЛК
POST/oauth2/token

Get access_token by client_credentials flow

Headers

Authorizationstringrequired

Basic base64(client_id:client_secret)

Request Body

application/x-www-form-urlencodedrequired

Form for requesting access token using client_credentials

grant_typestringrequired

OAuth2 grant type, must be 'client_credentials'

Пример: client_credentials

scopestringrequired

Must be 'ROLE_EXTERNAL_INTEGRATION'

Пример: ROLE_EXTERNAL_INTEGRATION

Responses

curl -X POST \
  'http://dev-backend-1.guestme.space/oauth2/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&scope=ROLE_EXTERNAL_INTEGRATION'
Response
{
  "scope": "ROLE_EXTERNAL_INTEGRATION",
  "access_token": "eyJhbGciOiJIUzUxMiJ9...",
  "token_type": "Bearer",
  "expires_in": 599
}