Luca Looz
Luca Looz

Reputation: 281

Google OAuth 2.0 refresh token 400 Bad Request only for some users

I'm using OAuth 2.0 to access Gmail accounts, only for some accounts i receive "NO Invalid credentials" when trying to login through the SASL XOAUTH2 mechanism.
For those accounts if i try to refresh the access token Google returns me 400 Bad Request and an html response:

<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>

Suggestions? I have read on Google Developers site that to receive support by Google i have to write here.

EDIT: This is the raw request from Fiddler, the same request for other accounts works good

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

Upvotes: 0

Views: 1255

Answers (1)

breno
breno

Reputation: 3296

I see the request to the token endpoint posted here. Could you show a sample request that your app sent to the authorization endpoint? (The endpoint where the user sees an approval page?)

Upvotes: 0

Related Questions