Menu

Login

Login is the first request required before you can use any of the other requests the API is providing. To use this POST request you will need the following information

  • a-api-key provided by Gatehouse

Request

Login request requires two parameter which is marked with red wrapped in a json body and a header key. The a-api-key is provided by Gatehouse and are required in all header when using DaaS API. user_id and password, must be included in the json body similar as shown below.

{
  "user_id": "<user_name>",
  "password": "<users password>"
}

Example – Valid login

{
  "user_id": "abc@efg.com",
  "password": "3PG%3HY#7!awjGXt"
}

More information about the constrains of user_id and password and be found here.

Response

Correct usage results in 201 response (created) in the format shown below

The request has succeeded and a new resource has been created as a result. This is typically the response sent after POST requests, or some PUT requests.

{
  "token": "<335 character long string>",
  "expires": "YYYY-MM-DD HH:MM:SS"
}

Example – Retrieve token

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjA2MzI3NDQsIm5iZiI6MTYyMDYzMjc0NCwianRpIjoiNTAxMTU1NTAtNjE2My00MjJiLTgzNGYtZjgzYTlhMDM1ZjgxIiwiZXhwIjoxNjIwNjY4NzQ0LCJpZGVudGl0eSI6ImludGVncmF0aW9uX3Rlc3QiLCJmcmVzaCI6ZmFsc2UsInR5cGUiOiJhY2Nlc3MiLCJ1c2VyX2NsYWltcyI6eyJjb21wYW55X2lkIjoiMSJ9fQ.FU8MVj-Fb6fZD_xHDXZ50KG1B3PcAFAPXdZ_NEOrBQA",
  "expires": "2021-05-10 17:45:44.196194"
}

#TODO Additional response code regarding invalid parameters

Additional response can be found here, related to 400 error codes.

Updated on 05 May, 2021