Commit 363f3b3f authored by thibaut-felten's avatar thibaut-felten

Doc

parent c9b788aa
<!-- LOGIN -->
# Login
Used to collect a Token for a registered User.
**URL** : `/api/login/`
**Method** : `POST`
**Auth required** : NO
**Data constraints**
```json
{
"username": "[valid email address]",
"password": "[password in plain text]"
}
```
**Data example**
```json
{
"username": "iloveauth@example.com",
"password": "abcd1234"
}
```
## Success Response
**Code** : `200 OK`
**Content example**
```json
{
"token": "93144b288eb1fdccbe46d6fc0f241a51766ecd3d"
}
```
## Error Response
**Condition** : If 'username' and 'password' combination is wrong.
**Code** : `400 BAD REQUEST`
**Content** :
```json
{
"non_field_errors": [
"Unable to login with provided credentials."
]
}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment