Fetch-mode API returning "Too many requests found"

Fetch-mode API returning “Too many requests found”, but the time is in proper format - 2022-03-07T05:49:41.792Z

2022-03-07 11:19:41,229 INFO com.hmisg.ndhm.access.NdhmAccessService [https-openssl-nio-443-exec-3] KPMG::NHDM NdhmSessionResquest Http body -><NdhmSessionResquest(clientId=SBX_000077, clientSecret=de436157-d9ce-488c-a77c-430edebaed3a),[Content-Type:“application/json”]>
2022-03-07 11:19:41,792 INFO com.hmisg.common.util.CommonDateUtil [https-openssl-nio-443-exec-3] Time Stamp >>>2022-03-07T05:49:41.792Z
2022-03-07 11:19:41,792 INFO com.hmisg.ndhm.service.NdhmApiCallService [https-openssl-nio-443-exec-3] HMISG::NHDM NdhmSessionResquest Http body ->com.hmisg.ndhm.request.dto.NdhmUserAuthFetchModeRequest@384279e3
2022-03-07 11:19:41,885 ERROR com.hmisg.ndhm.service.NdhmApiCallService [https-openssl-nio-443-exec-3] HMISG::NHDM Error ->org.springframework.web.client.HttpClientErrorException$TooManyRequests: 429 Too Many Requests: “{“error”:{“code”:2429,“message”:“Too many requests found”}}”

Hi @bunair

Gateway expects unique requestId (UUID) & current timestamp (differing by a few seconds is still fine but should not be ahead of current time).

please use Request body.

“requestId”: “{{$guid}}”,
“timestamp”: “{{timestamp}}”,` in request body

In pre-request script

const moment = require(‘moment’);
pm.globals.set(“timestamp”, moment.utc().format(“YYYY-MM-DDTHH:mm:ss.SSSSSS”));

Please check again and let us know.

Thanks

I have used the same code in the pre request script, still i am getting the error like ‘Too many requests found’, for this API ‘‘https://dev.abdm.gov.in/gateway/v0.5/consent-requests/status’’ in m3
please give me a solution of this!!!


@Arvind_Tomar

Hi @sar_debu, Add this in pre-request script and try again.

const moment = require(‘moment’);

pm.globals.set(“timestamp”, moment.utc().add(200, ‘seconds’).format(“YYYY-MM-DDTHH:mm:ss.SSSSSS”));