Authenticate using an API Key

POST /api/authenticate

Verifies that a given API key is valid and returns a token to authorize requests if it is.

Body

The API Key authentication parameters

Responses

  • OK

    Hide response attribute Show response attribute object
  • Bad Request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

POST /api/authenticate
curl \
 -X POST http://localhost:4000/api/authenticate \
 -d '{"api_key":"abcdefghijk12345"}'
Request examples
{
  "api_key": "abcdefghijk12345"
}
Response examples (200)
{
  "session_token": "SFMyNTY.g2gDbQAAACQyZDc3NDhkMy1jNzAyLTQ0ZTItODI3NS1jMDVhM2Y2NWY1ZGVuBgDRctrbiQFiAAFRgA.n3giyccj8XtTKgQDVO24xz8GkyIOEURO1FgwTeEgl5Y"
}
Response examples (200)
{
  "session_token": "SFMyNTY.g2gDbQAAACQyZDc3NDhkMy1jNzAyLTQ0ZTItODI3NS1jMDVhM2Y2NWY1ZGVuBgDRctrbiQFiAAFRgA.n3giyccj8XtTKgQDVO24xz8GkyIOEURO1FgwTeEgl5Y"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}