Google API gmail错误403和401

时间:2014-10-15 21:40:18

标签: google-api

尝试从Gmail帐户中提取邮件。

我点击"发送请求"按钮,这就是我得到的: (我已经更改了授权码)

GET /gmail/v1/users/{userId}/messages HTTP/1.1
Host: www.googleapis.com
Content-length: 0
Authorization: Bearer ya29.nwDDjrH18VYHzBaFoaEDQltoenRUlFRxzMh94MGKekMSD8sBWvjqS2TF
HTTP/1.1 401 Unauthorized
Content-length: 249
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Wed, 15 Oct 2014 21:28:28 GMT
Vary: Origin,Referer,X-Origin
Server: GSE
Cache-control: private, max-age=0
Date: Wed, 15 Oct 2014 21:28:28 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": "Invalid Credentials", 
    "errors": [
      {
        "locationType": "header", 
        "domain": "global", 
        "message": "Invalid Credentials", 
        "reason": "authError", 
        "location": "Authorization"
      }
    ]
  }
}

这是我点击"发送请求"按钮。1

0 个答案:

没有答案