0
votes

I am doing this right now: https://developers.google.com/google-apps/calendar/v3/push

I set up watchers for a given user through oauth and I get a notification when there is an update to their calendar to poll for changes. But is there a way to get notifications for shared calendars that they have access to or other calendars that they create?

I am not getting any notifications for any events that are not the default user's calendar. Any help would be appreciated.

1

1 Answers

0
votes

The user must make a watch request to the notification channel.

POST https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/watch
Authorization: Bearer auth_token_for_current_user
Content-Type: application/json

{
"id": "01234567-89ab-cdef-0123456789ab", // Your channel ID.
"type": "web_hook",
"address": "https://example.com/notifications", // Your receiving URL.
...
"token": "target=myApp-myCalendarChannelDest", // (Optional) Your channel token.
"expiration": 1426325213000 // (Optional) Your requested channel expiration time.
}
}

NOTE:

Each notification channel is associated both with a particular user and a particular resource (or set of resources). A watch request will not be successful unless the current user owns or has permission to access this resource.