node.js - GoogleAPI NodeJS: calendar.events.watch gets error push.webhookUrlNotHttps or pushWebhookBadDomain -
i have followed setups required in https://developers.google.com/google-apps/calendar/v3/push (i think) , i'm trying register callback url watch events, 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 error message: 'no valid domain webhook callback: https://https://api.mysite.com', reason: 'pushwebhookbaddomain'. if try put address "api.mysite.com/notifications" (as seems https getting duplicated), error message: 'webhook callback must https: api.mysite.com/notifications', reason: 'push.webhookurlnothttps'
can me please? thank you
i got work. hope can someone. here way:
on developers console, url must without https method included.
on webmaster tools, url must https cannonical domain.
my problem on developers console added all possibilities (4 domains in total), service uses first one, wrong.
in call, right, https , method:
resource: { id: "yourchannelid", type: 'web_hook', address: "https://api.mysite.com/notifications" }
Comments
Post a Comment