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
Name | Type | Value |
---|---|---|
Origin | Header | Provided by Team while on-boarding a new Api Client |
X-Api-Key | Header | Shared by dice team || Visible on dashboard |
Authorization | Header | Can be generated by client from dashboard |
Possible Errors
All errors with EA prefix are authentication errors
Error | Error Code | Reason |
---|---|---|
Origin not found | EA001 | The tenant shared in header doesn't match any origin. |
Client not found | EA002 | The token shared in header doesn't attached to any client |
Status of this origin is invalid | EA003 | Tenant is inactive now |
Origin invalid key mapping | EA004 | The X-Api-Key doesn't match any keys |
Client id not found | EA005 | Client 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'