This is base authentication which is required for all your apis

Api Authentication

All api calls has to be authenticated using an api key and oauth 2 bearer token. Api key and origin is shared while generating a client

🚧

Bearer Token Info

A bearer token is generated with validity. Once that validity is expired you need to generate a new access token from dashboard

NameTypeValue
OriginHeaderProvided by Team while on-boarding a new Api Client
X-Api-KeyHeaderShared by dice team || Visible on dashboard
AuthorizationHeaderCan be generated by client from dashboard

Possible Errors

All errors with EA prefix are authentication errors

ErrorError CodeReason
Origin not foundEA001The tenant shared in header doesn't match any origin.
Client not foundEA002The token shared in header doesn't attached to any client
Status of this origin is invalidEA003Tenant is inactive now
Origin invalid key mappingEA004The X-Api-Key doesn't match any keys
Client id not foundEA005Client is regenerated or token is reset
curl --location --request GET 'https://https://saasapi.cleartrip.com/origin/client' \
--header 'Origin: {{Origin}}' \
--header 'X-Api-Key: {{X-Api-Key}}' \
--header 'Authorization: Bearer {{Authorization}}' \
--header 'Content-Type: application/json'