Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 722 Bytes

login.md

File metadata and controls

55 lines (38 loc) · 722 Bytes

Login

Used to collect a Token for a registered User.

URL : /api/login/

Method : POST

Auth required : NO

Data constraints

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

Data example

{
    "username": "[email protected]",
    "password": "abcd1234"
}

Success Response

Code : 200 OK

Content example

{
    "token": "93144b288eb1fdccbe46d6fc0f241a51766ecd3d"
}

Error Response

Condition : If 'username' and 'password' combination is wrong.

Code : 400 BAD REQUEST

Content :

{
    "non_field_errors": [
        "Unable to login with provided credentials."
    ]
}