---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.ru/support/retail/ru/ref/authenticationPush.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/retail/ru/llms.txt

<div class="openapi">

# Аутентификация Партнёра в системе Яндекс Еды

<!-- markdownlint-disable-file -->

Метод позволяет Партнёру получить токен авторизации для выполнения push-методов в системе Яндекс Еды.

{% note info %}

Заголовок `Content-type` в запросе и ответе отличаются.

{% endnote %}


## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
/oauth2/token
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/x-www-form-urlencoded" %}

```json translate=no
{
  "client_id": "987",
  "client_secret": "g8bKdBiIR9MutCObuexDm7nsgkaXU",
  "grant_type": "client_credentials",
  "scope": "read write"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_client_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `987`
{.table-cell}
||
||

_client_secret_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `g8bKdBiIR9MutCObuexDm7nsgkaXU`
{.table-cell}
||
||

_grant_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `client_credentials`
{.table-cell}
||
||

_scope_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `read write`
{.table-cell}
||
|#{.json-schema-properties}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Успешная аутентификация.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "access_token": "bqehYcfk7Tb2zKRkxQ-IaK9nHyntdYnlpJ7kwTNX3B6mIKPws",
  "expires_in": 120,
  "scope": "vendor_management",
  "token_type": "bearer"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_access_token_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Токен

_Example:_{.json-schema-reset .json-schema-example} `bqehYcfk7Tb2zKRkxQ-IaK9nHyntdYnlpJ7kwTNX3B6mIKPws`
{.table-cell}
||
||

_expires_in_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Время жизни токена.
{.table-cell}
||
||

_scope_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `vendor_management`
{.table-cell}
||
||

_token_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Тип токена

_Example:_{.json-schema-reset .json-schema-example} `bearer`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Ошибка авторизации.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "message": "example",
  "code": 0,
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.