[英]Is there any way to know the waitTime if Google calendar usageLimit or rateLimit is reached
I am working on developing integration with Google Calendar using Rest API. I got to know Google applies both rateLimit and usageLimit on API calls - 403_calendar_usage_limits_exceeded我正在使用 Rest API 开发与 Google 日历的集成。我知道 Google 在 API 调用上同时应用了 rateLimit 和 usageLimit - 403_calendar_usage_limits_exceeded
In case I breach the limits, I want to wait for a defined period of time before I retry the request again.万一我违反了限制,我想等待一段定义的时间,然后再重试请求。 Is there any way to know if there is something like
Retry-After
header returned by Google.有什么办法可以知道谷歌是否返回了
Retry-After
header 之类的东西。
I checked documentation but not able to find anything related - errors我检查了文档但找不到任何相关的内容 -错误
You can see your quota in google developer console under libary search for google calendar and then click the manage button.您可以在谷歌开发者控制台的 libary search for google calendar 下查看您的配额,然后单击管理按钮。 Under the quota tab you will see something like this.
在配额选项卡下,您会看到类似这样的内容。
There are two types of quota user based quota denoted by the "per user" and project based quotas.有两种类型的配额基于用户的配额表示为“每用户”和基于项目的配额。
Each user running my application can make a max of 600 requests per minute.每个运行我的应用程序的用户每分钟最多可以发出 600 个请求。 if they make to many then i will get a quota exception.
如果他们做了很多,那么我将获得配额例外。
My application can make a max of 10000 request per minute in total.我的应用程序每分钟最多可以发出 10000 个请求。 if it makes more then that then again i will get a quota exception.
如果它赚得更多,那么我将再次获得配额例外。
You may want to read though Manage quotas this explains a lot about quota usage and the google calendar api.您可能想阅读管理配额这解释了很多关于配额使用和谷歌日历 api 的内容。
For the most part if you just implement exponential backoff you should be able to avoid to many of these errors.在大多数情况下,如果您只是实施指数退避,您应该能够避免其中的许多错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.