I\'m creating a channel that receive changes on users that are on my application. The main problem is that after 2-3 webhooks, I receive an error that says that user has exceede
There was an error in the code. I had to change the following:
PageToken = changes.getNewStartPageToken();
to
pageToken = changes.getNextPageToken();
The huge amount of queries was because I was requesting on every loop a new start page token, forcing an infinite loop.
The error you have encountered was discussed in this guide.
Suggested actions:
- Raise the per-user quota in the Developer Console project.
- If one user is making a lot of requests on behalf of many users of a G Suite domain, consider a Service Account with authority delegation (setting the quotaUser parameter).
- Use exponential backoff.
You can also try visiting this SO post for related issue.