API endpoint zones times out with low call rate

I am calling CloudFlare’s PHP API to get the zone ID of a domain like this:

It turns out, this endpoint:
GET https://api.cloudflare.com/client/v4/zones?page=1&per_page=20&match=all&name=mydomain.com
throws “429 Too Many Requests” quite a lot, with this message:
{“success”:false,“errors”:[{“code”:971,“message”:“Please wait and consider throttling your request speed”}],“messages”:[ (truncated…)

I am pretty sure I’ve stayed below this 1200-calls-every-5-minutes limit all the time. However, I still keep running into this issue. Curiously, calling other endpoints doesn’t time out like this.

My workaround is to use a hard-coded zone ID without calling the endpoint, so the above won’t be a problem in the first place.

So I assume the zone ID of a domain is immutable, i.e., it NEVER changes.

Is my assumption correct?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.