Generate Token

Most of the API endpoints require authentication. So you need to log in to gain a valid token and then add that in the following requests through the header Authentication: TokenType Token:

curl -XPOST -i http://localhost:8000/api/login -H "Content-Type: application/json" -d '{"email": "[email protected]", "password": "123"}'

If you have informed the correct credentials, the response will be:

HTTP/1.1 200 OK
Content-Type: application/json
Request-Id: aleal.local/E8z3MiQMuT-000004
Date: Sat, 06 Dec 2014 01:29:51 GMT
Content-Length: 144

{
	"token":"6rrKX79WwwEnECZMmeYLm8tzSWZmN_mLT7XiFPN14Og=",
  "token_type":"Token",
  "expires":86400,
  "created_at":"2014-12-06T01:31:11.854062102Z"
 }