我想基于使用API浏览器和Chrome的高级REST客户端给出的例子来观看赛事资源。 https://developers.google.com/google-apps/calendar/v3/push#watch_request_examples
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": "01234567-89ab-cdef-0123456789ab",
"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证书,这是强制性的接收推送通知
我GOOGLE了这个问题,但找不到太大的帮助。
- 发布在谷歌组压延机的API,但没有任何反应同样的问题呢。 https://groups.google.com/forum/#!topic/google-calendar-api/ZHKwm2xWuNE
有谁能够引导,什么不妥的要求吗?