Hi,
Today we are getting error “Too Many Requests correlation-id” in all gateway API’s, even though the request Id we are passing is always unique.
Not sure how suddenly we are getting this error today.
thanks,
robin
Hi,
Today we are getting error “Too Many Requests correlation-id” in all gateway API’s, even though the request Id we are passing is always unique.
Not sure how suddenly we are getting this error today.
thanks,
robin
Can you please post a sample curl that you are using and the exact response?
Generally Too Many Requests
is when the request-id/timestamp are not unique
are you making sure that the timestamp that you are passing is current? Gateway, will not allow that if the timestamp is way out of sync. Meaning, you can’t call an API with a timestamp ahead or way behind (few seconds adrift is ok).
Hi,
This is the curl. We have the same code was working fine until Saterday.
curl --location --request POST ‘https://dev.ndhm.gov.in/gateway/v0.5/users/auth/fetch-modes’
–header ‘Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2MDEyOTgwNjcsImlhdCI6MTYwMTI5Nzc2NywianRpIjoiYzViMTZhYzAtNWFiNC00OGZiLWEzOGUtOTJkM2M2YmYxYjU3IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJjN2FhODA5YS00YzczLTRiODEtOWMxMi1iMzY0ODNhYWYzYTAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJPSElQTF8yMTM2Mjg3Iiwic2Vzc2lvbl9zdGF0ZSI6IjAyZTdkMjdjLWFlNjQtNDFhMC1iMjMwLTAyM2Y5YTc5MDcyYiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwiaGlwIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiT0hJUExfMjEzNjI4NyI6eyJyb2xlcyI6WyJ1bWFfcHJvdGVjdGlvbiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgZW1haWwgcHJvZmlsZSIsImNsaWVudEhvc3QiOiIxMC4yMzMuNjcuNzEiLCJjbGllbnRJZCI6Ik9ISVBMXzIxMzYyODciLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInByZWZlcnJlZF91c2VybmFtZSI6InNlcnZpY2UtYWNjb3VudC1vaGlwbF8yMTM2Mjg3IiwiY2xpZW50QWRkcmVzcyI6IjEwLjIzMy42Ny43MSJ9.gEB8YhOHlrvdg96IKPAIOSCAMq0KUmTIAsBmfx9EPP46L5jSYoB2sFRHkaK_unJNxiq4PzkPQYq4YJuHdxbgfSy2Q4e9v8LQ1O1vu52EM-gHasj9UUfxdlpskIzkVrGu0XtUA7wzk8YcXLvySRtnQDOpySLEn1LswpJc0NACpoigHV16qPLJxKy1Q94-YyvrB59iYUDFGMH9vc3DnbZvavAGodALV_1k5-1jyss1P1rUlbffmL7CYFbpBYG0VJfx5TopHoNSjCokPFzBZAat2As1NAkNpsZufW_-GpUQ0UlP_ZC5mjxcQB2ZOkqoIY9jtgzjdmVMj29zopw683X6vA’
–header ‘X-HIP-ID: ICLINIQ-ORANE-HIP’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS01960242=01115a1c9032bba3ba8f5931723687480a149f55acfd96302846e03f4b8c50504d7fc13adba0f48436c83d5fc1f7f5bec32bb2777d’
–data-raw ‘{“requestId”:“44eafbf8-f32e-4fb8-b657-3cb6ec7182f9”,“timestamp”:“2020-09-28T12:58:18Z”,“query”:{“id”:“mrobin@sbx”,“purpose”:“LINK”,“requester”:{“type”:“HIP”,“id”:“ICLINIQ-ORANE-HIP”}}}’
The API timestamp is GMT right?
can u post the pre-script that is used to generate unique id and timestamp in postman? thank you
Hi Vineet,
Thanks for the reply.
#1. This is PHP script used to create UUID
static public function gen_uuid() {
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
// 32 bits for "time_low"
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
// 16 bits for "time_mid"
mt_rand( 0, 0xffff ),
// 16 bits for "time_hi_and_version",
// four most significant bits holds version number 4
mt_rand( 0, 0x0fff ) | 0x4000,
// 16 bits, 8 bits for "clk_seq_hi_res",
// 8 bits for "clk_seq_low",
// two most significant bits holds zero and one for variant DCE1.1
mt_rand( 0, 0x3fff ) | 0x8000,
// 48 bits for "node"
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
);
}
#2. This is the PHP script used to generate timestamp in GMT.
$timestamp = gmdate(‘Y-m-d’).‘T’.gmdate(‘H:i:s’).‘Z’;
This issue is only occurring on the local system. But works well in the server. But, Not sure, May be this is SSL related issue in local. This issue is resolved for now.