22 July 2023 onwards, all EasyEcom API can only be accessed by passing both parameters in request headers. Failing to provide that token, the user will not be allowed to access the API and will receive HTTP code 401.
You can access our API documentation at https://api-docs.easyecom.io which now reflects a new method of authorizing your requests
To generate a JWT token, refer to the Authorization section in the API documentation
Jwt_token generated by the above method needs to be passed in the header for subsequent API calls 'Authorization: Bearer <jwt_token>'.
This token will be valid for 90 days and the new token can be generated by calling the above API again.
We are also introducing API Throttling. All clients under the same company will be provided with a limit of 10 requests/seconds and a burst of 20 requests. Once the allowed quota is consumed, HTTP Code 429 Too Many Requests will be responded to by API.
Below is a sample curl request which uses both the mandatory headers:
curl --location --request GET 'https://api.easyecom.io/<endpoint>'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOixxxxxxxxxxxxxxxxxxxxx’
--header 'Content-Type: application/json'