【发布时间】:2013-07-15 10:27:05
【问题描述】:
我正在使用 OAuth 2.0 访问 Gmail 帐户,仅当我尝试通过 SASL XOAUTH2 机制登录时收到“NO Invalid credentials”的某些帐户。
对于那些帐户,如果我尝试刷新访问令牌,Google 会返回 400 Bad Request 和 html 响应:
<HTML>
<HEAD>
<TITLE>Error processing OAuth 2 request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Error processing OAuth 2 request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>
建议?我在谷歌开发者网站上读到,要获得谷歌的支持,我必须在这里写。
编辑: 这是来自 Fiddler 的原始请求,其他帐户的相同请求效果很好
POST https://accounts.google.com/o/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: accounts.google.com
Content-Length: 175
Expect: 100-continue
Connection: Keep-Alive
refresh_token=1%2FNyVRzman0nPK9cis4ctiigyBvl1yfsPxb6REXXXXXXXX&client_id=6206XXXXXXXX.apps.googleusercontent.com&client_secret=h4-q_wigfzlwGkGkXXXXXXXX&grant_type=refresh_token
【问题讨论】:
-
您需要在此处粘贴请求以获得答案
-
添加了原始请求
-
我遇到了同样的问题。你知道解决办法吗?
-
我遇到了同样的问题...使用 googles pyhton 库...适用于 Google Apps 用户,但使用 gmail 用户失败。
标签: gmail oauth-2.0 google-oauth