API URL Endpoint: https://api.geniq.io/rest/v1/token
Before generating the access token, you must first access our console to create an API key and secret. Once the API key and secret are generated, you can use them to generate the access 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:
PARAMETER | FORMAT | DESCRIPTION |
expiry | string | Token expiry timestamp in RFC3339 format (Y-m-d\TH:i:sP) |
responseMessage | string | Response message returned from the API call |
responseCode | integer | Response code returned from the API call. Refer to section “Response Codes” for list of possible values |
token | string | Generated 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"
}