Authentication

⌘K
  1. Home
  2. Docs
  3. Authentication
  4. Request Access Token

Request Access Token

API URL Endpointhttps://api.geniq.io/rest/v1/token

If the API key is ea6caf57-91d0-4fee-b045-8a3df7266a50 and the password is EkiKRvmuELKrw3aDPH756tJUfnvtlVtpy2IjItWCOoeMXzlVacJanVugWt3IXd4fcyY= then the resulting Authorization header will be:

Authorization: Basic M2Y1OTZlYjYtMDRmMy00ODQxLThjZjUtYjU3NzE3YjdkOTUwOkVraUtSdm11RUxLcnczYURQSDc1NnRKVWZudnRsVnRweTJJakl0V0NPb2VNWHpsVmFjSmFuVnVnV3QzSVhkNGZjeVk9

Sample request using CURL:

$ curl -X POST https://api.geniq.io/rest/v1/token\
-H 'Authorization: Basic M2Y1OTZlYjYtMDRmMy00ODQxLThjZjUtYjU3NzE3YjdkOTUwOkVraUtSdm11RUxLcnczYURQSDc1NnRKVWZudnRsVnRweTJJakl0V0NPb2VNWHpsVmFjSmFuVnVnV3QzSVhkNGZjeVk9' 

Parameters returned in the API response:

PARAMETERFORMATDESCRIPTION
expirystringToken expiry timestamp in RFC3339 format (Y-m-d\TH:i:sP)
responseMessagestringResponse message returned from the API call
responseCodeintegerResponse code returned from the API call. Refer to section “Response Codes” for list of possible values
tokenstringGenerated token. Use this value for the send message request

Sample Response:

{
    "expiry": "2024-12-11T16:14:46+08:00",
    "responseMessage": "Success",
    "responseCode": "0",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}