[英]Google Calendar Api v3 quota exceeded
我在創建日歷事件(使用 google 服務帳戶)時遇到問題,我啟用了域范圍委派。
我得到的錯誤是:“消息[超出日歷使用限制。]位置[-]原因[quotaExceeded]域[usageLimits]”
我檢查了使用情況及其以下 10 個請求(配額設置為 1,000,000)
這是我的代碼:
string[] Scopes = { CalendarService.Scope.Calendar, CalendarService.Scope.CalendarEvents };
using (var stream = new FileStream("cred.json", FileMode.Open, FileAccess.Read))
{
GoogleCredential credential = GoogleCredential.FromStream(stream)
.CreateScoped(Scopes);
var service = new CalendarService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "TEST",
});
var ev = new Event();
EventDateTime start = new EventDateTime();
start.DateTime = DateTime.Now.AddMinutes(30);
EventDateTime end = new EventDateTime();
end.DateTime = DateTime.Now.AddMinutes(60);
ev.Start = start;
ev.End = end;
ev.Summary = "Test";
ev.Description = "Please Work";
ev.Attendees = new List<EventAttendee>
{
new EventAttendee() { Email = "TestMail@gmail.com" }
};
var calendarId = "primary";
service.Events.Insert(ev, calendarId).Execute();
如果我嘗試在沒有與會者的情況下執行代碼,它會運行而不會出現任何錯誤。
以前有人遇到過這個問題嗎?
這是一個已知錯誤
它已在問題跟蹤器上報告。 您可以單擊問題編號旁邊的星號以給予錯誤更高的優先級並接收更新。
但是,這有當前的解決方法(除了不包括與會者):
域范圍委派或模擬用戶
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.