Login
You can authenticate with the API.
Request
For certain requests, you need a user token which you can retrieve as follows:
POST /user/login
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| payload | boolean | email of the user | test@flatchr.io | ||
| password | payload | string | User password | #Poulpe45 |
Request example
- OSX / GNU/Linux users
- Windows users
cURL request
curl -X POST 'https://api.flatchr.io/user/login'
-H 'Content-Type: application/json'
-d '{"email":"test@flatchr.io", "password":"#Poulpe45"}'
cURL request
curl -X POST "https://api.flatchr.io/user/login"
-H "Content-Type: application/json"
-d "{\"email\":\"test@flatchr.io\",\"password\":\"#Poulpe45\"}"
Response
| Name | Type | Description |
|---|---|---|
| statusCode | integer | Request status |
| token | string | User token |
Response example
{
"statusCode": 200,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWlmQGZsYXRjaHIuaW8iLCKpYXQiOjE2NDQ8NDkxNjQsImV4cCI6MTY0NTM4MTE2NH0.yfbr7HQjx90eZdXr9gEQ7FfqQoV4Lm53oZDhC0DMmMU"
}