From 0f82e5348ca891066d5cfbbf2d64b9b2bc61f4d2 Mon Sep 17 00:00:00 2001 From: Nikita Basharov Date: Mon, 28 Jun 2021 10:55:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=82=D0=BE=D1=87=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=20=D0=BF=D0=B0=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D1=83=20redirect=5Furi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/authorization_for_user.md | 1 + docs_eng/authorization_for_user.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/authorization_for_user.md b/docs/authorization_for_user.md index e4c41c9c..42532461 100644 --- a/docs/authorization_for_user.md +++ b/docs/authorization_for_user.md @@ -96,6 +96,7 @@ Location: {redirect_uri}?code={authorization_code} * `grant_type=authorization_code` * `client_id` и `client_secret` - необходимо заполнить значениями, выданными при [регистрации приложения](https://dev.hh.ru/admin) +* `redirect_uri` - если параметр был уточнен на шаге [получения авторизации](#get-auth), необходимо передать уточненный `redirect_uri` или вернется ошибка, если уточнения не было, параметр можно не посылать. * `code` – значение `authorization_code`, полученное при [перенаправлении пользователя](#get-authorization_code) diff --git a/docs_eng/authorization_for_user.md b/docs_eng/authorization_for_user.md index 58e4dcc9..a201a786 100644 --- a/docs_eng/authorization_for_user.md +++ b/docs_eng/authorization_for_user.md @@ -95,6 +95,12 @@ The request body should contain the following information: * `client_secret={client_secret}` * `code={authorization_code}` +If, when obtaining the `authorization_code`, `redirect_uri` was indicated, then +this value must be sent in the request (strings are compared); otherwise this +parameter is optional. If `redirect_uri` is not indicated when requesting +`/oauth/authorize`, then, when indicating it in the second request +(`/oauth/token`), the server will return an error. + Request body must be sent in standard `application/x-www-form-urlencoded` with the indication of a corresponding title `Content-Type`.