我正在嘗試使用API Explorer和Chrome Advanced Rest Client基於給定示例觀察事件資源。 https://developers.google.com/google-apps/calendar/v3/push#watch_request_examples無法接收Google日曆的推送通知
Requst
POST https://www.googleapis.com/calendar/v3/calendars/XXX%40gmail.com/events/watch?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZSNBYiHYPu6Y1_5P08hdb-EX5pdF4Ygj5ou_RKp_jOCS5beiDDH
X-JavaScript-User-Agent: Google APIs Explorer
{
"id": "-89ab-cdef-ab",
"type": "web_hook",
"address": "https://www.example.com/WebHook/Index",
"token": "token=123546"
}
響應
401 Unauthorized
cache-control: private, max-age=0
content-encoding: gzip
content-length: 188
content-type: application/json; charset=UTF-8
date: Thu, 17 Oct 2013 12:49:00 GMT
expires: Thu, 17 Oct 2013 12:49:00 GMT
server: GSE
www-authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://www.example.com/WebHook/Index"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://www.example.com/WebHook/Index"
}
}
- 我已經列入白名單我的域名www.example.com
我已經有強制接收推送的SSL證書 通知
我對此問題進行了搜索,但找不到太多幫助。
- 在谷歌組的日曆上發佈了同樣的問題api,但沒有迴應。 https://groups.google.com/forum/#!topic/google-calendar-api/ZHKwm2xWuNE
任何人都可以引導,最新的請求是什麼錯?