目前我們正在開發一個iPhone應用程序,處理谷歌日曆的過程。需要將日曆事件同步到服務器端。一切正常。谷歌日曆推送通知:未經授權的webhook電話
但對於推送通知,我們下面this process
每當我們POST請求: https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/watch
與參數
"id":Unique string (channel id) ,
"type": "web_hook",
"address": "https://abc-api.herokuapp.com/user/notifications"
在標題中,我們發出
Authorization : **Bearer 'Access_token'**
和內容類型:JSON
我們已經在谷歌API控制檯
ACCESS_TOKEN是用戶的帳戶訪問令牌加入域的授權域。
我們收到「未經授權的webhook調用」錯誤。
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
}
任何人在這裏誰可以幫助我們解決這個問題?