Skip to content
Ivan Udovin edited this page Jan 1, 2021 · 12 revisions

Authorization

Almost all API handlers require authorization.

Guest

Guest authorization used for handlers where no any authorization is required.

Password

Password authorization is used only when we need to obtain new Session. In this case request body should have following JSON content:

{
  "login": "{user.login}",
  "password": "{user.password}"
}

Session

If API handler allows this method of authorization then you should pass session cookie with following content:

{session.id}_{session.secret}

Users

Register a new user

POST /api/v0/register

Auth: Guest.

Form fields:

  • login (string)
  • password (string)
  • email (string)
  • first_name (string?)
  • last_name (string?)
  • middle_name (string?)

Login user

POST /api/v0/login

Auth: Password.

Form fields:

  • login, password (string) – for password auth.

Logout from current session

DELETE /api/v0/logout

Auth: Session.

Links: solve.by, Telegram.

Clone this wiki locally