-
Notifications
You must be signed in to change notification settings - Fork 0
Log in endpoint
David Alejandro Molano Vásquez edited this page Feb 9, 2020
·
1 revision
This endpoint permits users log-in. Accepts only POST
requests.
To log-in a user the request must provide the fields:
- Email: The email of the user registering. Will be used for authentication.
- Password: The password for the account that it´s being created.
If authentication is successful the requests returns a bearer token that has to be included in the authorization header of protected requests.
The table below details how to use the endpoint:
URL | /api/login |
---|---|
Method | POST |
URL Params | None |
Data Params | { "email": [string], "password": [alphanumeric]} |
Success Response Code: 200 |
{"token":[bearer_token_string]} |
Error Response Code: 400 |
{"Error": "Email or password missing"} |
Error Response Code: 500 |
{"Error": "Something went wrong"} |