We are developing a project working with Gmail API, it might exceed the API limit on this page https://developers.google.com/gmail/api/v1/reference/quota
API Limit
Daily Usage 1,000,000,000 quota units per day
Per User Rate Limit 250 quota units per user per second
"Exceeding a rate limit will cause an HTTP 403 or HTTP 429 Too Many Requests response and your app should respond by retrying with exponential backoff."
- So we can we make a call from script, to check the number of API call left before we run the project? Or it can only be seen in google API console in a web page?
- Does the HTTP 403 error bonded to Daily Usage limit and HTTP 429 bonded to User Rate Limit?
- Does the API limit Daily Usage means calendar day?
The link that you've provided gives a lot of information about Gmail Quota Usage and limits.
1.So we can we make a call from script, to check the number of API call left before we run the project? Or it can only be seen in google API console in a web page?
To view the quota usage, access your developer console. And you are correct, it is viewable using the console. You can also see traffic ( number of request per seconds), and error ratio of the enabled API of your project.
2.Does the HTTP 403 error bonded to Daily Usage limit and HTTP 429 bonded to User Rate Limit?
According to the documentation Usage Limits:
Exceeding a rate limit will cause an HTTP 403 or HTTP 429 Too Many Requests response and your app should respond by retrying with exponential backoff.
An error 4xx is more likely be related to user rate limit. And the documentation discussed what to do when experiencing an error 4xx (exponential backoff).
3.Does the API limit Daily Usage means calendar day?
Daily usage means the maximum API requests per day
Hope this info helps.