Log in

1. API Description

This API is used to log in. After the user logs in successfully, the Session ID is stored in the Cookie (Cookie: sid-[serial number]=t2i704wbvoy51y408p588bpji010ibp0).

Request mode: POST [ip]/api/user/login

Administrator Rights Logged-in
No No

2. Input Parameters

Name Required Type Description
username Yes String The user name, obtained using Get system user list
password Yes String The password which is encrypted with sha256

3. Output Parameters

Name Type Description
status Int Status code
code String Status description
sid String User ID

4. Example

Logging in.

Input Example
{
    "username":"test",
    "password":"c4ca4238a0b923820dcc509a6f75849b"
}
Output Example

Response Headers

    Content-Type: application/json; charset=utf-8
    Expires: 0
    Set-Cookie: sid-A506220808450=6440wa6u5wfw8wv43f91v55cqkctnpv6

Response Body

{
    "status": 0,
    "code": "Success",
    "sid": "6440wa6u5wfw8wv43f91v55cqkctnpv6"
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
7 MW_STATUS_INVALID_ARG The parameters are missing
16 MW_STATUS_NOT_EXIST The user does not exist
36 MW_STATUS_AUTH_FAILED Wrong password

results matching ""

    No results matching ""

    results matching ""

      No results matching ""