Google sheets API v4: HttpError 429. “Resource has been exhausted (e.g. check quota).”

徘徊边缘 提交于 2019-12-12 02:13:48

问题


I have been updating about 1000 sheets using Python. Each takes about 2-3 minutes to update. The job ran most of the day yesterday (~8hrs). And when I look at my quotas for Google Sheets API in console.developers.google.com, I have used about 3k in the read group and 4k in the write group. Not nearly close to the 40k quota that is given.

Now all of the 1000 sheets interact with one sheet because all of the keys are on that one sheet.

In fact, I have tried using 2 different project sign ins, one through my company domain and one through my gmail, that both have access to these files. When I run it with the company credentials. It also gives me a HttpError 429, and 0 requests have been made with that credential.

Is there some hidden quota I don't know about? Like calls to one spreadsheet? That's what it seems like. Google, are you cutting me off to the spreadsheet because I accessed it for 8hrs yesterday?

It is bombing on spreadsheets().values().update and spreadsheets().batchUpdate


回答1:


Sheets API has a quota limit of 40,000 queries per day. You can see that in Usage Limits docs:

This version of thea Google Sheets API has a default limit of 40,000 queries per day.

To view or change usage limits for your project, or to request an increase to your quota, do the following:

If you don't already have a billing account for your project, then create one. Visit the Enabled APIs page of the API library in the API Console, and select an API from the list. To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.



来源:https://stackoverflow.com/questions/42735670/google-sheets-api-v4-httperror-429-resource-has-been-exhausted-e-g-check-qu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!