Google Calendar Push Notifications SetUp

Create a notification channel for every individual resource, then any modification to that resource you will be then notified. Information below is directly from Google (Creating notification channels).

Making watch requests:

Each watchable Google Calendar API resource has an associated watch method at a URI of the following form:

https://www.googleapis.com/**apiName**/**apiVersion**/**resourcePath**/watch

To set up a notification channel for messages about changes to a particular resource, send a POST request to the watch method for the resource.
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.

Example:

Start watching for changes to a collection of events on a given calendar:

POST https://www.googleapis.com/calendar/v3/calendars/my_calendar@gmail.com/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.
  }
}

Reference: Google (Creating notification channels) (19-Mar-2018).

  • Address?
  • Token?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)