I am trying to subscribe to calendar event notifications in the JS client library as follows:
gapi.client.load('calendar', 'v3', function () {
var request = gapi.client.calendar.events.watch({
'calendarId': cl.gCalendarID,
'id': unid,
'type': "web_hook",
'address': {my url here}
});
request.execute(function (resp) {
console.log(resp);
});
});
But I just get 400 returned with a useless message " Entity.Resource"
In the response data object, I get Domain:global, Message: Entity.Resource, reason: Required"
I have already authenticated with oauth2, and I have granted access to my Google account, and I can successfully get the list of calendars, and I extract calendars from them, but this method for subscribing to the clock will not work? Please help, I can’t find anything on Google.
source
share