I am using Google Calendar API v3 through a .NET client library to create an installed app. In my Developer Console, I have a project defined on the Calendar API. I am able to correct the events, but can not clear the calendar. The following code works from the account that created the project, but will not work for any other account (403 is forbidden):
UserCredential credential; Credential = Wait GoogleWebAuthorizationBroker.AuthorizeAsync (New Client Sites {ClientID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.appsercontent.com", Clientcrct = "Execution"}, New [] {CalendarService.Scope.Calendar}, "johndoe@gmail.com", canceled Token None, New FileDataStore ("Somefolder"); // Service CS = Create New Calendar Service (New Base Client Service. Initial () {HttpClientInitializer = Credential, ApplicationName = "Calendar App",}); . Cs.Calendars.Clear ("primary") executed (); // 403 returned here
How can I fix this, so am I able to clean the user's primary calendar? I have seen the user talking about sharing my calendar, but it is not practical, and they have already given my App Calendar API permission.
The problem should not be with the above code or my project setup. This was a problem I Tested with an account. This is a single error for this particular account, even because of trying to "delete all events in the calendar" via the web interface. It has been tested on many other accounts, and they work fine, the search around it reveals that this is not a very unusual problem, people who can walk. I incorrectly gave it to code, but it was a problem specific to that account.
Comments
Post a Comment