【发布时间】:2016-02-02 04:05:21
【问题描述】:
我已按照https://developers.google.com/google-apps/calendar/v3/push(我认为)中要求的所有设置,我正在尝试使用以下代码注册我的回调 URL 以观看事件:
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);
});
我收到错误message: 'No valid domain for WebHook callback: https://https://api.mysite.com', reason: 'pushWebhookBadDomain'。如果我尝试将地址设置为“api.mysite.com/notifications”(因为似乎 https 被重复了),那么我会收到错误 message: 'WebHook callback must be HTTPS: api.mysite.com/notifications', reason: 'push.webhookUrlNotHttps'
谁能帮帮我? 谢谢
【问题讨论】:
-
在创建通知渠道之前,您是否能够在开发者控制台的域验证页面中注册您的域?
-
@adjuremods 是的,在根目录中使用 html 在 Webmasters 中注册,然后添加到我的日历服务的“允许域”中。还有其他地方可以添加吗?
-
好吧,我回到网站管理员工具,看到一个错误““SSL/TLS 证书不包括域名,”。所以也许是这样,我会在修复它时发布。
标签: node.js google-calendar-api google-api-nodejs-client