Commit e08affb8 authored by thibaut-felten's avatar thibaut-felten

Doc

parent 363f3b3f
......@@ -17,60 +17,3 @@ request.
* Update data : `PUT /api.php/user/{id}`
<!-- 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