HOWTO Insert Non-primary Google Calendar Event?

If you do not specify Google Calendar URI, the event will be added to the primary calendar. So, you need to figure out which URI of calendar is the right URI you want to update.

In “Calendar Settings” -> “Calendars”, Select the calendar which you want to update. You will see the link of XML. The XML link will like below :

#KEY# is your secret.

Replacing the “public/basic” part with “private/full“. It will become the Google Calendar URI.

Add the URI as the second parameter in the insertEvent function. Like below :

// $createdEntry = $gc->insertEvent($newEntry);
$createdEntry = $gc->insertEvent($newEntry, "");

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.