Перейти к основному содержанию
POST
/
oauth
/
v2
/
token
curl --request POST \
  --url http://localhost:8080/oauth/v2/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=service_client \
  --data client_secret=service_secret \
  --data 'scope=catalog.lounges:read catalog.fasttrack:read'
{
  "access_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "catalog.lounges:read catalog.fasttrack:read"
}

Тело

application/x-www-form-urlencoded
grant_type
enum<string>
обязательно
Доступные опции:
client_credentials,
authorization_code
client_id
string

Идентификатор клиента (для client_credentials)

client_secret
string

Секрет клиента (для client_credentials)

scope
string

Пробел-разделенный список scope

code
string

Authorization code от callback (для authorization_code)

code_verifier
string

PKCE code_verifier (для authorization_code)

redirect_uri
string

Redirect URI для проверки (для authorization_code)

Ответ

Успешная выдача токена

access_token
string
обязательно
token_type
enum<string>
обязательно
Доступные опции:
Bearer
expires_in
integer<int64>
обязательно
Требуемый диапазон: x >= 1
scope
string

Выданные scope через пробел