我正在尝试创建一个可以在授权日历上创建事件的小应用程序。这是我的C#代码:
EventsResource.InsertRequest insertRequest = service.Events.Insert(new Event()
{
Description = "Pickup scheduled",
Created = System.DateTime.Today,
Start = new EventDateTime() { DateTime = DateTime.Today} ,
Kind = "Pickup schedule for Tide",
EndTimeUnspecified = true ,
Location = "Your address",
Visibility = "default" ,
},
"abc@gmail.com");
return insertRequest.Execute();
但是我仍然出现此错误:
Forbidden [403]
Errors [
Message[Forbidden] Location[ - ] Reason[forbidden] Domain[global]
各种帖子都建议删除token.json文件。我这样做了,然后看到该对话框提示我具有正确的权限:
所以,我现在完全不知所措。任何帮助将不胜感激。