When we are sending bulk records(Ex:250) using API to WCO, we are able to create 135 records in WCO but after 135 records we are getting 401 - UnAuthorized error. Is there any time limit for the API connection or API Keys.
For a deeper look into our World Check One API, look into:
When we are sending bulk records(Ex:250) using API to WCO, we are able to create 135 records in WCO but after 135 records we are getting 401 - UnAuthorized error. Is there any time limit for the API connection or API Keys.
I assume you are sending each request concurrently because we do not have the functionality of sending bulk request.
No we do not have a time limit for the API connection or API key as each request establishes a new connection.
The reason you may be getting a 401 is because the date header value you are sending would be getting outdated after 135 requests. The dateheader value sent in the request should be exact as per the GMT clock, although we allow a leeway of 40 to 50 seconds on the timestamp but anything more than that we consider the date header value to be expired and send a 401 to avoid replay attack.
Kindly send a fresh date header value for each request instead of using the same timestamp for all your concurrent request. This can be done by defining a new date header value for each request instead of using the same dateheader value for every concurrent request.
Hello @Irfan,
Thank you so much for your reply. Now i am able to send bulk request at a time with out hitting any unauthorised access after sending the date value header as GMT for each request .
That's great news and I am glad to hear that the API calls are being sent concurrently.
Kindly accept the answer so that our other users can get benefitted by your question.