title: Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com'
body: <p>Our application makes use of a service account that has been authorized for the entire domain by the admin. With this service account our application accesses the domain user's emails with Gmail APIs like GetMessage.</p>
  <p>All of a sudden, starting this week, we have started receiving the errors intermittently</p>
  <pre><code>Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:XYZ
  </code></pre>
  <p>There is no change in our application or frequency at which we access emails. We are using batch size of 10 while using the API.</p>
  <p>The 'Quota exceeded errors count (10 sec) - Queries per minute' graph in the GCP dashboard is empty. So we are really not sure what is going on and why we are suddenly hitting the quota limits.</p>
  <p>Also, I am not sure how the 'per-user' limit is applied when my app accesses the user mailboxes with the service account. The documentation around this is vague, at least to me.</p>
  <p>These errors are really impacting our ability to serve our customers. Moreover not knowing why we are getting these errors is shaking our confidence in the Gmail APIs.</p>
  <p>Any help in this regard is highly appreciated.</p>
  <p>Thanks</p>
  <p>UPDATE:
  Today we are seeing lots of</p>
  <pre><code>&quot;User-rate limit exceeded.  Retry after &lt;timestamp&gt;&quot;
  </code></pre>
  <p>errors. Seems like this time around we are hitting some quota limit other than 'queries per minute'. While I look in my client implementation and figure out why this is happening, feel free to share any recommendations you may have.</p>
  <p>Thanks.</p>