谷歌push.webhookUrlUnauthorized错误
问题描述:
I'm using google calendar API with push notification, till yesterday it was working fine but today it gives me error : here it is.
HTTP/1.1 401 Unauthorized
Vary: X-Origin
WWW-Authenticate: Bearer realm="https://accounts.google.com/", error=invalid_token
Content-Type: application/json; charset=UTF-8
Date: Sat, 31 Oct 2015 06:43:59 GMT
Expires: Sat, 31 Oct 2015 06:43:59 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic,p=1
Alt-Svc: quic=":443"; p="1"; ma=604800
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://api.hustl.it/test.php"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://api.hustl.it/test.php"
}
}
我正在使用谷歌日历API和推送通知,直到昨天它工作正常,但今天它给了我错误: 在这里。 p>
HTTP / 1.1 401 Unauthorized
Vary:X-Origin
WWW-Authenticate:Bearer realm =“https://accounts.google.com/”, error = invalid_token
Content-Type:application / json; charset = UTF-8
日期:星期六,2015年10月31日06:43:59 GMT
Expires:星期六,2015年10月31日06:43:59 GMT
Cache-Control:private,max-age = 0
X-Content- 类型选项:nosniff
X-Frame-Options:SAMEORIGIN
X-XSS-Protection:1; mode = block
Server:GSE
Alternate-Protocol:443:quic,p = 1
Alt-Svc:quic =“:443”; p值= “1”; ma = 604800
Accept-Ranges:none
Vary:Origin,Accept-Encoding
Transfer-Encoding:chunked
{
“error”:{
“errors”:[
{
“domain” :“global”,
“reason”:“push.webhookUrlUnauthorized”,
“message”:“未经授权的WebHook回调频道:https://api.hustl.it/test.php”
}
],
“code”:401,
“message”:“未经授权的WebHook回调频道:https://api.hustl.it/test.php”
}
}
code> pre>
p>
div>
答
Based on the Push Notifications page of the Calendar API developer guide, a valid SSL certificate should be installed on the webserver. You can check it out first if the SSL certificate currently installed expired or was removed.
Also note that invalid certificates include
- Self-signed certificates.
- Certificates signed by an untrusted source.
- Certificates that have been revoked.
- Certificates that have a subject that doesn't match the target hostname.
Another important item to consider based on the page is that the domain in URL used in the address
value should be registered in the Google Developer Console
Hope this helps!