
@H_419_22@
{
"ID": "154345345-345345345",
"type": "web_hook",
"address": "https://www.somedomain.com/web_hook.PHP"
}我已将域名添加到网站管理员工具以证明所有权,并将其添加到developers console中的“允许域名”列表中.
发送以下请求:
@H_419_22@
POST /calendar/v3/calendars/tl7Grdo4gqdqj4gtanpioksi6k@group.calendar.Google.com/events/watch http/1.1
Host: www.GoogleAPIs.com
Content-length: 105
Content-type: application/Json
Authorization: Bearer <some access token>
{
"ID": "154345345-345345345",
"address": "https://www.somedomain.com/web_hook.PHP"
}产生以下响应:
@H_419_22@
http/1.1 401 Unauthorized
Content-length: 318
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Tue,09 Sep 2014 13:22:51 GMT
Server: GSE
Cache-control: private,max-age=0
Date: Tue,09 Sep 2014 13:22:51 GMT
x-frame-options: SAMEORIGIN
Content-type: application/Json; charset=UTF-8
Www-authenticate: Bearer realm="https://accounts.Google.com/AuthSubRequest",error=invalID_token
{
"error": {
"code": 401,
"message": "Unauthorized WebHook callback channel: https://www.somedomain.com/web_hook.PHP",
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized"
}
]
}
}我希望得到一些非常基本但具体的步骤,我需要遵循这些步骤以使其正常运行.谢谢你的帮助.
解决方法 显然,oAuth playground根本没有通过 developers console添加的域的句柄,以验证所提供的webhook已被授权.我设法使用代码,它似乎跟 *** 场一样. 总结以上是内存溢出为你收集整理的curl – Google日历“未经授权的WebHook回调频道”错误全部内容,希望文章能够帮你解决curl – Google日历“未经授权的WebHook回调频道”错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)