• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2357
  • Last Modified:

Google Calendar API - "Execution of Request Failed" Error

I am following the example shown in the Data API Developer's Guide of creating a single occurrence of a Google Calendar Event and am getting an error.  The URL I am using is the ID from my calendar (changed here for security).

 Dim service As CalendarService = New CalendarService("joe")

 Dim entry As EventEntry = New EventEntry()
 entry.Title.Text = "Tennis with Beth"
 entry.Content.Content = "Meet for a quick lesson."

 Dim eventLocation As [Where] = New [Where]
 eventLocation.ValueString = "South Tennis Courts"

Dim eventTime As [When] = New [When](DateTime.Now, DateTime.Now.AddHours(2))

 Dim postUri As Uri = New Uri("https://www.google.com/calendar/feeds/eshrew%40gmail.com/private-ea9fe2afd20axy74a3a855c9trea32c/full")
Dim insertedEntry As AtomEntry = service.Insert(postUri, entry)

The error I am getting is "Execution of Request Failed" and a more detailed error says, "This feed is read-only".

Any help would be appreciated.  Thanks.
  • 2
1 Solution
esemmocAuthor Commented:
Just to add, I am authenticating successfully with
Service.setUserCredentials("joe@gmail.com", "mypassword")

and I am able to insert without an error using this URL.


My problem seems to be that I can't Update or Delete when I use a URL with an ID for a specific calendar.

esemmocAuthor Commented:
Yes it did as it took me in the right direction.  The calendar ID I got from my google calendar settings for my secondary calendar was this:


The correct Calendar ID to use should be this:


This code displays each calendar name and the corresponding ID:

 Dim myService As CalendarService = New CalendarService("exampleCo-exampleApp-1")
 myService.setUserCredentials("joe@gmail.com", "joepass")

 Dim query As CalendarQuery = New CalendarQuery()
 query.Uri = New Uri("https://www.google.com/calendar/feeds/default/allcalendars/full")
 Dim resultFeed As CalendarFeed = myService.Query(query)

For Each entry As CalendarEntry In resultFeed.Entries

     MessageBox.Show(entry.Title.Text & "  " & entry.Id.AbsoluteUri.Substring(63))


Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now