Kate Shutova
Kate Shutova

Reputation: 23

Consultation on limits

I would like to get advice on limits. We are developing an application that collects data (mails) of employees working in client companies. The average size of a client company is 10,000 - 30,000 employees, each employee creates about 30 mails per day. We collect emails evenly by employees (for 2 weeks in the past, for a month in the past, etc.). We need a data download speed of about 400,000-500,000 mails per hour. We use application (clientId, clientSecret, service account) to get access to google workspace of our clients. How do limits work in this case? How can we make one application for many client companies and not go beyond the limits? We don't want to block others with the load on one client. We need to load the data of all clients equally. For loading of mails we use messages.list and messages.get.

Upvotes: 0

Views: 41

Answers (1)

Juan Serrano
Juan Serrano

Reputation: 379

You will find a list of all the public Gmail API limits at https://developers.google.com/gmail/api/reference/quota, keep in mind that this public information does not include internal limits (Google won't disclose them to prevent abuse).

For instance, your entire application will be allowed 1B quota units for all its users, different actions consume different amounts of quota units.

Although very unlikely, it is possible that a project for all your clients may not be enough, since you will be working with lots of users and dozens of emails per user you should consider using a service account (if you haven't already) with a project that belongs to the organization you will be working with. Effectively spreading the API load in multiple projects. If one reaches the limits it won't affect your other clients.

You will be able to use the same code. As long as you account for multiple service account credential files and users in different domains the usage will be practically identical.

In case you need it, information on how to use domain wide delegation (to impersonate users from the domain) is available in this page https://developers.google.com/admin-sdk/directory/v1/guides/delegation, although this is part of another API the implementation is the same.

Upvotes: 1

Related Questions