Search code examples
google-apigoogle-calendar-apigoogle-developers-console

Google Calendar Api quota: use one google account for thousand users


I see there are 2 quota types in Google Calendar Api.

  1. Queries per day. Max 1,000,000
  2. Queries per 100 seconds per user. Max 100,000,000

I can't understand how these quotas work. How can (2) be higher than (1)?

My production scenario:

  • Our product has many customers (hundreds)

  • Each customer may have many users

  • And users will sync their Google Calendar with our system. And we're using GoogleApi to do the job

  • Currently, because we don't understand how the quotas work, we've been creating each customer a new developer account to call the api.

I want to be clear about the quotas.

Because 1 million requests per day may not be enough, but 100 millions requests per 100 seconds per user is fine and we can use only one google account to do the job.

Thank you!


Solution

  • Queries per day. Max 1,000,000

    Per day quota is a project based quota. This quota will effect your full project. Your entire project and all its users can max make 1,000,000 requests per day.

    Queries per 100 seconds per user. Max 100,000,000

    Is a user based quota also known as flood protection. Each user is most often denoted by the ip address but can also be denoted by you sending the quotauser parameter with your request. can max make 100,000,000 per 100 seconds.

    How can (user quota) be higher than (project quota)?

    This is what my project says by default

    enter image description here

    If i click on the pencile icon i can apply for an extension

    enter image description here

    I can also apply for an extension of the per day quota

    I cant tell you for sure but my guess is someone in your organisation applied for a quota extension for the user per second quota and not the per day quota. This could explain why your numbers appear to be off.

    You can test this by trying to create a new project and enable the google calendar api you will see that the per second quota is by default 500 not 100,000,000. If it is i strongly suggest you submit a bug report because there is no way thats correct.

    One application one projet

    The way the system is intended to work is that. Your application Super calendar app, should have a project on google developer console. This will give you a set of credentials that identify your project to Google.

    When users access your application they will be displayed a form requesting consent to allow your application access to their data. You should only have one project on Google developer console that your customers will be connecting though.

    If you have one project per customer you are going to have one heck of a time getting all of these projects verified though Google.