status code: 429, error: Number of allowed API requests per minute exceeded
Posted May 14, 2022
Hi there,
I want to ask for some assistance with an issue I am facing.
I am sending a request to the following URL:
https://<client_name>.zendesk.com/api/v2/tickets/2426492/metrics.json
And I got the 429 error message that, according to Zendesk's docs, means too many requests. The Retry-After header specifies that you can retry the API call in 93 seconds. Your code should stop making additional API requests until enough time has passed to retry.
I did it; I stopped my code and made additional requests within 93 seconds; I tried even sleeping for 100 seconds but still got the same error
That is what I get:
{'Date': 'Sat, 14 May 2022 15:09:59 GMT', 'Content-Type': 'text/plain', 'Content-Length': '50', 'Connection': 'keep-alive', 'Zendesk-Api-Version': '2022-01-01', 'retry-after': '1', 'x-rate-limit': '700', 'x-rate-limit-remaining': '0', 'cache-control': 'max-age=1,public', 'strict-transport-security': 'max-age=31536000;', 'x-zendesk-origin-server': 'classic-app-server-7476444d4-q4p2z', 'x-request-id': '70b48ed9ef145866-IAD, 70b48ed9ef145866-IAD', 'x-runtime': '0.050546', 'x-envoy-upstream-service-time': '52', 'x-envoy-decorator-operation': 'classic.classic.svc.cluster.local:80/*', 'X-Zendesk-Zorg': 'yes', 'CF-Cache-Status': 'DYNAMIC', 'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Report-To': '{"endpoints":[{"url":"https:\\/\/a.nel.cloudflare.com\/report\/v3?s=okhXEf6FCTnZsVYXfzGHBHUg3rowqi%2FU%2FQwrLeg%2F7dCyPD6%2B2LrMdzK6w5cvoIK04XujT%2Fc%2Bjh4XlDmGCULpmmwaAD4XXlsVvEyGVooZgTvX0vSaOuYjHOkSqPDX6D9yOd%2Fay%2FLEWBYWI%2FU%3D"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare', 'CF-RAY': '70b48ed9ef145866-IAD'}
Any idea how can I solve it?
Thanks!
0
2 comments
Sign in to leave a comment.