Authenticate a user

POST /api/auth

authenticates a user and returns a JWT token for use in futher API requests

application/json

Body Required

Get JWT Token

  • client_token string
  • client_secret string

Responses

  • default application/json

    Get user

    Hide response attributes Show response attributes object
    • error boolean
    • data string
    • message string
POST /api/auth
curl \
 --request POST 'http://api.example.com/api/auth' \
 --header "Content-Type: application/json" \
 --data '{"client_token":"has7ner\u0026\u0026asenrc%1324faadfdxHDFFaawe","client_secret":"3ZlciIsIkdyb3VwIFBlcm1pc3Npb25zIiwiQ29tcGFuaWVzIiwiT3RoZXIgUm9sZXMiLCJzdGFmZiIsIlBlcm1pc3Npb25zIiwiRG9jdW1lbnRzIiwidmlldyIsIkFncmVlbWVudHMiLCJwcmljZ"}'
Request examples
{
  "client_token": "has7ner&&asenrc%1324faadfdxHDFFaawe",
  "client_secret": "3ZlciIsIkdyb3VwIFBlcm1pc3Npb25zIiwiQ29tcGFuaWVzIiwiT3RoZXIgUm9sZXMiLCJzdGFmZiIsIlBlcm1pc3Npb25zIiwiRG9jdW1lbnRzIiwidmlldyIsIkFncmVlbWVudHMiLCJwcmljZ"
}
Response examples (default)
{
  "error": false,
  "data": "Bearer <<256bit Key>>",
  "message": "Bearer token created and it expires in 180 minutes"
}