Login - MarcoLagalla/marette_backend GitHub Wiki
| Name | Users Login |
|---|---|
| Description | Performs login and returns Auth Token |
| URL | api/v1/account/login |
| Allowed methods | POST |
| Authorizations | AllowAny |
POST
Performs login using email and password. Creates and stores an authentication token that has to be included in every single request.
| Field | Type | Required | Unique | Comments |
|---|---|---|---|---|
email |
str | yes | yes | |
password |
str | yes | no |
{
"email": "[email protected]",
"password": "123456"
}
And returns a token like this with status --> HTTP_200_OK
{
"token": "91aa36797b2bb417ea7efcc5fa254c76cfcdcebb",
"id": 4
}
Otherwise, if some errors occurred (ex: wrong credentials...) --> HTTP_400_BAD_REQUEST