Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
We're dealing with a weird situation where some Google Cal API requests respond with the 403 "Calendar limits exceeded", even though I look in the Console, we seem to be way under for "Queries per minute" (which I assume count "Queries per minute per user" as well?).
The setup is like this:
We have two accounts (say worker1@our-domain.com and worker2@our-domain.com) that are signed in to 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 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, and 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 we 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 only to 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 our platform and thus we'd use their own account to make changes, but, that's not an option at this time.
Hello!
We're dealing with a weird situation where some Google Cal API requests respond with the 403 "Calendar limits exceeded", even though I look in the Console, we seem to be way under for "Queries per minute" (which I assume count "Queries per minute per user" as well?).
The setup is like this:
Every ~20 minutes we search for events with a custom criteria:
calendar.events.move
)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 our platform and thus we'd use their own account to make changes, but, that's not an option at this time.
Ideas/Opinions?
Thanks!