×

User authorization

After obtaining a token, you can log in to the system using your login and password.

How to get data

Method

POST

Request address

To get the data, use the address: https://tasks.<server_address>/backend/public/login

Request parameters

  • login — user login or e-mail
  • password — password
  • language — interface language (e.g., en, ru)
  • timezone — user timezone in minutes (e.g., -180 for GMT+3)
 

Example request (JavaScript fetch):

fetch("https://tasks.<address>/backend/public/login", {
  method: "POST",
  headers: {
    "content-type": "application/x-www-form-urlencoded",
    "x-csrf-token": token
  },
  body: "login=demo&password=demo&language=en&timezone=-180",
  credentials: "include"
});

Responses

Successful login:
{
  "auth": true,
  "items": {
    "id": 123,
    "name": "demo",
    "email": "demo@example.com",
    "c_fio": "Ivanov Ivan Ivanovich",
    "c_account_id": 456
  },
  "resAccParams": { ... },
  "permissionsAcc": { ... },
  "parametersTemplate": { ... },
  "ip": "192.168.1.10"
}
  • auth — login result (true if login is successful)
  • items — user information:
  • id — unique user ID
  • name — login
  • email — email address
  • c_fio — full name of the user
  • c_account_id — account ID the user belongs to
  • resAccParams — account settings (e.g., tariff, restrictions, account parameters)
  • permissionsAcc — list of permissions (user access rights to system functions)
  • parametersTemplate — template settings (default parameters for operation)
  • ip — IP address from which the user logged in
 
Login error:
{
  "auth": false,
  "msg": "Invalid login or password"
}