1
votes

After 40 calls to users.settings.filters.create I start to receive User-rate limit errors. All future filters.create calls then fail for the next (approx) 24hrs. Specific error message below.

HTTP 429 "User-rate limit exceeded. Retry after 2021-05-19T07:24:15.104Z (Forwarding rules)] Location[ - ] Reason[rateLimitExceeded] Domain[global]"

I have a 5-second delay between each call, so well under the published daily usage and per-user rate limits. I calculate the API allows 250 / 5 = 50 calls per second. https://developers.google.com/gmail/api/reference/quota

We are using Google Workspace Legacy edition, the project OAuth consent is set for Internal use and the project is not verified (not a requirement for Internal).

Is there an obvious reason that 40 consecutive filters.create calls spread over 200 seconds would trigger a User-rate limit in these circumstances?

1
Are they "user rate limit" or just "rate limit"? The error message would just suggest "rate limit". Its odd that it should block it for 24 hours though. Have you tried spacing out the requests more? Is it always exactly 40 requests? This may suggest that the error message is wrong.iansedano
Always 40 requests. I have tried delays from 300ms up to 5s. I suspect it may be a gsuite legacy (free) limit but have no evidence to back it upTonyL
Seems like that is not a rate limit but a quota limit, which seems well below what is published as the general limit. But as you rightly say, there seems to be no documentation on the limits for legacy accounts. Have you looked in your GCP project dashboard for quota information specific to your account? Have you considered filing a bug to the Issue tracker? Maybe worth it just so they can look at the error messageiansedano
Agree this looks like a quota issue but there are no exceeded quotas in the project dashboard. I have added this to the Issue Tracker, thanks for the suggestion.TonyL
Nice! Another quick suggestion - link the issue here as an answer to your question in case anyone has the same issue in future.iansedano

1 Answers

0
votes

Limitations for unverified apps are across the board. The fact that your app is for internal use only doesn't matter you must still abide by the unverified app restrictions.

If you want to be able to send more then that you will need to apply for verification.

Because your app is for workspace account and internal use it should be easer for you to verify it.