Has the grant_type=authorization_code been changed to return a new value?

1435 views
Skip to first unread message

Christopher Walker

unread,
Dec 8, 2011, 10:16:39 AM12/8/11
to oauth...@googlegroups.com
when I POST a request to https://accounts.google.com/o/oauth2/token where the grant_type = authorization_code, I no longer get a refresh_token returned.  Instead, I am getting a JSON structure which contains the following:

access_token
expires_in
token_type
id_token

and no longer contains refresh_token.  Has refresh_token been deprecated?

Guillaume Perrot

unread,
Dec 8, 2011, 10:49:17 AM12/8/11
to oauth...@googlegroups.com
Hi, I encountered the very same problem, the API has been updated very recently (today?).
You now have to add "access_type=offline" while building the https://accounts.google.com/o/oauth2/auth call to get the refresh token.
I noticed another change, but not an incompatible one: the name in the Authorization header while making a call. It used to be "OAuth" but now it's "Bearer".
Both names work as far as I tested.

Christopher Walker

unread,
Dec 8, 2011, 11:31:38 AM12/8/11
to oauth...@googlegroups.com
I'll give that a try.  I did notice that the so-called oauth token (access_token) seems to stay alive for a longer, yet to be determined, time.

Breno de Medeiros

unread,
Dec 8, 2011, 12:30:49 PM12/8/11
to oauth...@googlegroups.com
Please see the http://googlecode.blogspot.com/2011/10/upcoming-changes-to-oauth-20-endpoint.html
for more references on these changes.

--
--Breno

Reply all
Reply to author
Forward
0 new messages