I have followed all the setups required in https://developers.google.com/google-apps/calendar/v3/push (I think) and I'm trying to register my callback URL to watch events, with this code:
calendar.events.watch({
auth:jwtClient,
resource: {
id: "yourChannelId",
type: 'web_hook',
address: "https://api.mysite.com/notifications"
},
calendarId: "mycalendarId"
}, function(error, response) {
if (error) {
console.log(error);
return;
}
console.log(response);
});
And I get the error message: 'No valid domain for WebHook callback: https://https://api.mysite.com', reason: 'pushWebhookBadDomain'
. If I try to put the address as just "api.mysite.com/notifications" (as it seems that the https is getting duplicated), then I get the error message: 'WebHook callback must be HTTPS: api.mysite.com/notifications', reason: 'push.webhookUrlNotHttps'
Can anyone help me please? Thank you