API JWT Authentication - noemenend/Nodepop GitHub Wiki
API JWT Authentication
For authenticate to use the Nodepop API, you must get a token.
POST http://localnost:3000/api/v1/users/authenticate
Body request parameters:
* email: [email protected]
* password: 1234
{
"code": 200,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YmRjYmYyODA3ZWNkYTNiMjQ5MTllY2QiLCJpYXQiOjE1NDEyODM0ODYsImV4cCI6MTU0MTQ1NjI4Nn0.ClQApA1f0b8ysWwAwwuKz80yKEnue0ZYSklE9lssfKg"
}
Validation errors
If one of these parameters specificated bellow, don't meet with the type of the value expected by the API, it will return an array of validation error messages in JSON format.
{
"code": 401,
"message": "Invalid credentials"
}