Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

Login and key reception

Info

Status
colourGreen
titlepost
/login


Для отримання сесійного ключаTo receive a session key:

Request URL https://secure.ubki.ua/m2/login

Подачу запиту необхідно здійснювати в тілі POST методу. Текст запиту - це json-файл з заповненими атрибутами згідно вимог описаних нижчеThe request must be submitted in the POST method body. The request text is a .json file, with attributes completed according to the requirements below.

Request

{
"login": "string",
"password": "string"
}

Ключ діє до The key is valid until 23:59:59 дати, в яку він був отриманий. Новий ключ можна отримати з 22:00, він буде діяти з моменту отримання і весь наступний день. Kлюч може бути скомпрометований і заблокований з різних причин, сервіс поверне повідомлення "Помилка безпеки. Час життя сесійного ключа минув". У такій ситуації слід авторизуватися заново.

Сесійний ключ необхідно отримувати виключно один раз на добу.

Tip

Для роботи з API необхідно створити окремий логін.

Реєструє адміністратор організації, у своєму кабінеті, вкладка "налаштування-налаштування користувачів - зареєструвати - бойове середовище". Необхідна роль такому користувачеві встановлюється - Користувач/Користувач, при реєстрації також необхідно поставити позначку, що логін технічний та проставити йому IP, з яких будуть запити.

...

Після отримання сесійного ключа необхідно пройти авторизацію on the date it was received. A new key can be obtained starting from 22:00, and will be valid from the moment of reception during the next day. The key can be compromised and blocked for various reasons. The service will return the message “Security error. The session key has expired”. In this case, you should authorize again.

The session key must be received only once a day.

...

Tip

To work with the API, you need to create a separate login.

It is registered by the organization’s administrator in their area, the “Settings – User Settings – Register – Production Environment” tab. For this user, the role User/User is set as a required one. During registration, you must also select the check box to mark that the login is technical, and set the IP-address for it to make requests from.

...

After receiving the session key, you must authorize with UbkiSessionAuth (apiKey)

https://wiki-ubki.atlassian.net/wiki/spaces/SpecSpecification/pages/123666433124911755