I am using google calendar api v3 to fetch calendar events. But how to fetch all the recurring events. It just return single event with some hint like: DAILY;UNTIL=20 etc. Please help me out with this...
-
Please post your code - what have you tried already? – Albert Xing Apr 17 '13 at 17:49
2 Answers
If you are using the Events: list API method, add the singleEvents=true
parameter. From the API docs:
singleEvents
boolean
Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.

- 1
- 1

- 2,772
- 3
- 26
- 36
-
2This should be marked as the correct answer - simple and very accurate. Thanks, +1 – rebello95 Mar 17 '15 at 17:55
-
-
2It's nice when there's a magic parameter that solves my problem. – Captain Hypertext Sep 05 '17 at 16:11
-
-
If the event is a recurring event. You need to call another function in the API with the event ID and that will then return all the instances.
What does this mean 1) you get a normal even listing from the API. 2) then if you find an event that has ReccurenceID/Recurrence you can call the following with the EVENT ID. You can also specify parameters that you want to just like when searching for normal events (almost)
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId/instances
Here is a nice blog post on it. http://googleappsdeveloper.blogspot.com/2011/12/calendar-v3-best-practices-recurring.html
The google API page is at: https://developers.google.com/google-apps/calendar/v3/reference/events/instances
Cheers
Peter

- 9,241
- 8
- 31
- 46