Inform the user that the domain doesn’t allow your app to access Gmail.
Instruct the user to contact the domain Admin to request access for your app.
Resolve a 429 error: Too many requests
A 429 “Too many requests” error can occur due to daily per-user limits, including mail sending limits, bandwidth limits, or a per-user concurrent request limit. Information on each limit follows. However, each limit can be resolved
either by trying to retry failed requests or splitting processing across multiple Gmail accounts.
Note: Per-user limits cannot be increased for any reason.
Mail sending limits
The Gmail API enforces the standard daily mail sending limits. These limits differ for paying Google Workspace users and trial gmail.com How to delete archived emails in Gmail users. For these limits, refer to Gmail sending limits in Google Workspace.
These limits are per-user and are shared by all of the user’s clients, whether API clients, native/web clients or SMTP MSA. If these limits are exceeded, a HTTP 429 Too Many Requests “User-rate limit exceeded” “(Mail sending)” error is
returned with time to retry. Note that daily limits being exceeded may result in these types of errors for multiple hours before the request is accepted.
The mail sending pipeline is complex: once the user exceeds their quota, there can be a delay of several minutes before the API begins to return 429 error responses. So you cannot assume that a 200 response means the email was
successfully sent.
Bandwidth limits
The API has per-user upload and download bandwidth limits that are equal to, but independent of, IMAP. These limits are shared across all Gmail API clients for a given user.
These limits are typically only hit in exceptional or abusive situations. If these limits are exceeded a HTTP 429 Too Many Requests “User-rate limit exceeded” error is returned with a time to retry. Note that daily limits being exceeded
may result in these types of errors for multiple hours before the request is accepted.
Concurrent Requests
The Gmail API enforces a per-user concurrent request limit (in addition to the per-user rate limit). This limit is shared by all Gmail API clients accessing a given user and ensures that no API client is overloading a Gmail user mailbox