I am trying to implement push notifications feature in Google calendar api. I have also whitelisted my domain https://www.skygazr.com in webmaster tools and cloud console.
Now while am trying to create a working copy of Watch request it is giving me a webhookUrlUnauthorized error.
Please check the below request and response.
OST /calendar/v3/calendars/info%40bacnn.com/events/watch HTTP/1.1
Host: www.googleapis.com
Content-length: 111
Content-type: application/json
Authorization: Bearer ya29.1.AADtN_UTGxLw6gmqJTJIPX1VhOyuUckZw-yNjIPznP5Wefl0sxwnertq7ZEYP647CDOvQQ
{
"address": "https://www.skygazr.com/notifications",
"id": "push-notif-bacnn-0123456789ab",
"type": "web_hook"
}
HTTP/1.1 401 Unauthorized
Content-length: 302
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Wed, 11 Dec 2013 10:25:14 GMT
Server: GSE
Cache-control: private, max-age=0
Date: Wed, 11 Dec 2013 10:25:14 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
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.skygazr.com/notifications"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://www.skygazr.com/notifications"
}
}
I sincerely appreciate your help if someone can help me out here. I tried several methods and always its resulting the same issue. FYI I am checking request and response from https://developers.google.com/oauthplayground
Regards,
Dinesh
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…