945 B
945 B
Login
Used to set a session cookie.
URL : /api/login/
Method : POST
Auth required : NO
Data constraints
{
"username": "[valid username]",
"password": "[password in plain text]"
}
Data example
{
"username": "iloveauth",
"password": "abcd1234"
}
Success Response
Code : 200 OK
Header example
Set-Cookie: personal-gallery_auth=c944ee5bf6ee313191d0c242b79840e5a84967c3798a3526a1b356f6a04b; Path=/; Expires=Fri, 22 Mar 2024 10:33:50 GMT; HttpOnly; SameSite=Lax
Content example
{
"status": "success"
}
Error Response
Condition : If 'username' and 'password' combination is wrong.
Code : 401 Unauthorized
Content :
{
"status": "error"
}
Condition : If registration proccess isn't finished.
Code : 500 Internal Server Error
Content :
{
"status": "error"
}