Skip to content

Admin Login

Vaishakh GK edited this page Apr 24, 2023 · 4 revisions

Login

Route to login as admin.

URL : /api/admin/login

Method : POST

Auth Required : No

Data constraints

{
    "username": "[valid username]"
    "password": "[password in plain text]"
}

Data example

{
    "username": "admin",
    "password": "password"
}

Success Response

Code : 200 OK

Content example

"Login Successful"

Note: A session will be created for the user upon successful login.

Error Response

Condition : If 'username' or 'password' is wrong.

Code : 401 Unauthorized

Content :

"Wrong username or password"

Condition : Server Error

Code : 500 Internal Server Error

Content :

"Request failed"

Clone this wiki locally