【发布时间】:2016-04-13 05:26:26
【问题描述】:
我想使用谷歌日历通知。
我已将 Meteor 应用程序部署到
https://google-push-notification.meteor.com
我已经在 google web master 中验证了 url。
在 Google Console 的域验证中添加了相同的域。
我为 get 和 post 方法创建了 https://google-push-notification.meteor.com/api/articles 的 Meteor rest api。
下面是api的postman合集。 https://www.getpostman.com/collections/106be7c94d35fcbdb0f8
Post https://www.googleapis.com/calendar/v3/calendars/abc@gmail.com/events/watch
Authorization: Bearer ya29.YwJdqjlSv8Tkl5MEJgiVXQPGxE24ZfITuf8gt0C8DO_VHDvB_1mRAgpAx64R6Wpw8I6fiw
Content-Type: application/json
{
"id": "ya29.XwI-RJ54rS3dbRHgak8V_iTuV7uAWJoZfRFnUE76uCIIUbw4eILPsdEME56Jm5_EfDtWWWs",
"type": "web_hook",
"address": "https://google-push-notification.meteor.com/api/items"
}
I am getting the following response
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://google-push-notification.meteor.com/api/articles"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://google-push-notification.meteor.com/api/articles"
}
}
为什么即使我在 google 中验证了我的网站并在 google 控制台中添加了相同的域,我也会收到 push.webhookUrlUnauthorized 响应。
谁能帮我们解决这个问题
【问题讨论】:
标签: meteor google-calendar-api google-authentication