Authorization

Method: POST

Url: https://test.ninjalender.online/auth

Headers:

header_key

content

Content-Type:

application/json;

Request body:

Key

Type

Required

Decription

login

text

+

User login

password

text

+

User password

Response:

Ключ

Тип

Описание

code

int

Response code

message

string

Response message

data

JSON.object

Response data

data.access_token

string

Access token

log_key

numeric

ID for current request log

The received token should be added to the headers in all next requests.

Request example:

{
  "login": "test",
  "password": "25d55ad282aa400af464c76d713c07ad"
}

Response example:

Success:

{
    "code": 0,
    "message": "ok",
    "data": {
        "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1ODAzOTQxNzIsImV4cCI6MTU4MDQ4MDU3MiwidXNlcl9pZCI6IjEiLCJvcmdhbml6YXRpb25faWQiOiIxIn0.hidUXBWEUzI2NvkfrC2_pDNfXmIpIqd5KxqYNMdJDzQ"
    },
    "log_key": 728
}

Error:

{
    "code": -1,
    "message": "error",
    "log_key": 747,
    "errors": [
        {
            "code": -1000003,
            "message": "user not found"
        }
    ]
}
    

Error list:

Ключ

Сообщение

-96

invalid key

-97

invalid token

-98

expired token

-99

system error

-100

access denied

-1000001

login is blank

-1000002

invalid password

-1000003

user not found

-1000004

user is not active

-1000005

password did not match

Last updated