简体   繁体   English

Google Calendar API v3中对OAuth服务帐户的参加者有限制吗?

[英]Restrictions on attendees for OAuth Service Accounts in Google Calendar API v3?

I have a Service Account created in a Super Admin account on my domain. 我在域中的超级管理员帐户中创建了一个服务帐户。 I'm able to connect to the Google Calendar API v3 using the "Domain-wide Delegation of Authority" model provided by Google here ( https://developers.google.com/drive/delegation ). 我可以使用Google在此处( https://developers.google.com/drive/delegation )提供的“域范围的授权”模型连接到Google Calendar API v3。 I can list my own events, list the events of others. 我可以列出自己的事件,也可以列出其他事件。 No problem. 没问题。

However, I am running into issues when inserting events with external attendees. 但是,在与外部参与者插入事件时遇到问题。 To be clear, I can insert events just fine when including attendees within my own domain. 明确一点,当我的域中包括参与者时,我可以插入事件。 (Aside from mysteriously blank exceptions that need to be caught!) (除了需要捕获的神秘空白异常之外!)

I can successfully insert a few events like this with external attendees, but soon, I start getting: 我可以与外部参与者成功插入一些这样的事件,但是很快,我开始得到:

HttpError 403: "Calendar usage limits exceeded"

If I let it sit for a few hours, I can run it again and get a few events to insert, but then it starts with this error again. 如果我将其放置几个小时,则可以再次运行它并插入一些事件,但是随后再次从该错误开始。

Note: I'm not reaching the per-user quota and I'm nowhere near the daily courtesy limit. 注意:我没有达到每位用户的配额,并且距离每日礼遇限额还很遥远。 I do also have a sleep in the code between inserts. 我在插入之间的代码中也确实睡着了。 The body of the event is also confirmed to be well-formed. 活动的主体也被确认为格式正确。

I've isolated this issue down to the event attendees being external, seeing as how I do not get these errors when running the exact same code limited to attendees on the same domain. 我将这个问题归结为外部的事件参与者,以为在相同域中运行与参与者完全相同的代码时,如何避免出现这些错误。 Can someone explain why this is occurring? 有人可以解释为什么会这样吗?

Perhaps you're reaching the limit of 5 requests/second? 也许您正在达到5个请求/秒的限制? How many times a second are you attempting your inserts? 您每秒尝试插入几次? I have not found (here: usage limits ) that the Calendar API has a per-second usage limit, but some other APIs do have such a restriction... either 5/sec or 10/sec api calls... 我没有发现Calendar API有每秒使用限制 (在这里: 用法限制 ),但是其他一些API确实有这样的限制... 5 / sec或10 / sec api调用...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM