Hello!
We’re dealing with a weird situation where some Google Cal API requests respond with the 403 “Calendar limits exceeded”.
The setup is like this:
- We have two accounts (say worker1@our-domain.com, and worker2@our-domain.com) that are signed in into our management platform (OAuth with all calendar scopes)
- We have client accounts (>20), that each share (w/ Edit events permissions) their calendars with either worker1@... or worker2@... in such a way that’s it’s reasonably balanced)
- Both we and our clients use Google Workspace (so worker1@... and worker2@... are members of our workspace and let’s say user1@client1.com, user2@client1.com, userx@clientx.com all are members of their own Workspace)
Every 20 minutes we search for events with a custom criteria:
- we query for all events in the next 3 months, cache results (so that if we’re looking for events in a particular calendar we do not keep making requests)
- we search the cached events for that “custom” criteria
- if one is found it gets processed (modifying the title, moving the event, etc.)
- these actions are run concurrently
- the endpoint/API method that fails the most seems to be moving (calendar.events.move)
- if the method fails with a 403 I try to wait a full minute before retrying, but it seems that this is not helping and that error is returned again.
- I should mention that at this time events are processed one-by-one! (initially we were doing ~10 at once, but we have since [for the last 2 weeks or so] tried to only do them one at a time)
The bottom line is - where’s the flaw and what is causing the API to trigger the rate limit when, if you look at the Queries per minute value for the entire project we’re between 7-20 queries/min…
I know ideally each calendar used would be signed into the platform and thus we’d use their own account to do changes, but, that’s not an option at this time.
Ideas/Opinions?
Thanks,
David.