#nickdnk
1 messages · Page 1 of 1 (latest)
Not sure how to proceed as it does not explain the window or rate limit parameters
I'm even using an IP-restricted key
I need to fetch over 400 resources and it's giving me 5 at a time 😦
Yeah not sure if we have separate rate limits for specific resources, give me a few to look
I'm attempting to just big-brain it like this:
if ($count % 5 === 0) {
echo 'Sleeping for rate-limit...' . PHP_EOL;
sleep(20);
}
Maybe that works
hmm no not enough. I'll try with 30.
I think its 5 expands per minute
Alright
That helps
For future reference, it's common to include the parameters of a rate limit in the response, per https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 at least with a "retry after" or perhaps a "window_duration" + "max_requests" response in JSON
the dash info gives me nothing, I haven't checked the actual JSON
(because it's the PHP SDK)
Anyway the 60 second wait seems to do the trick
Thanks
NP! I don't know if the error is kept super generic for some obscure security/safety concern but I can flag
With such a small window it's not exactly rocket science to figure it out, it's just annoying to have to
so would make sense to just tell the client when you can make another request
All you win here is a bunch of "I'll just spam the API and when it works it works"