Аутентификация Партнёра в системе Яндекс Еды
Метод позволяет Партнёру получить токен авторизации для выполнения push-методов в системе Яндекс Еды.
Примечание
Заголовок Content-type в запросе и ответе отличаются.
Request
POST
/oauth2/token
Body
application/x-www-form-urlencoded
{
"client_id": "987",
"client_secret": "g8bKdBiIR9MutCObuexDm7nsgkaXU",
"grant_type": "client_credentials",
"scope": "read write"
}
|
Name |
Description |
|
client_id |
Type: string Example: |
|
client_secret |
Type: string Example: |
|
grant_type |
Type: string Example: |
|
scope |
Type: string Example: |
Responses
200 OK
Успешная аутентификация.
Body
application/json
{
"access_token": "bqehYcfk7Tb2zKRkxQ-IaK9nHyntdYnlpJ7kwTNX3B6mIKPws",
"expires_in": 120,
"scope": "vendor_management",
"token_type": "bearer"
}
|
Name |
Description |
|
access_token |
Type: string Токен Example: |
|
expires_in |
Type: integer Время жизни токена. |
|
scope |
Type: string Example: |
|
token_type |
Type: string Тип токена Example: |
401 Unauthorized
Ошибка авторизации.
Body
application/json
{
"message": "example",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code |
Type: integer Код ошибки. |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectExample
|
No longer supported, please use an alternative and newer version.