Nelu,

Typically invalid_grant means one of the information was not filled out 
correctly (e.g., putting developer token in as the client secret, etc), or 
that the refresh token is invalid, or that the original authorization URL 
may have missed critical parameters, such as using offline access.

Usually carefully following the Authentication guide 
<https://developers.google.com/adwords/api/docs/guides/authentication> 
would get you a working refresh token that can be re-used in most scenarios.

Thanks,

Ray

On Monday, September 15, 2014 9:20:59 AM UTC-4, Nelu Cambrea wrote:
>
> Hi all,
>
> I have a problem trying to refresh the access token (OAuth2.0). I'm using 
> the googleads-php-lib and everything is fine with the authorization 
> process, request for tokens and I get access to the AdWords API.
>
> The problem appears when I try to refresh the access token after about an 
> hour. If I try to use:
> $handler = $user->GetOAuth2Handler();
> $new = $handler->RefreshAccessToken( $user->GetOAuth2Info() );
>
> All I get is "An error has occured: { "error" : "invalid_grant" }" 
>
> I have checked the $user->GetOAuth2Info() data and it is the correct data 
> (client_id, client_secret, refresh_token, timestamp, expires_in). Have 
> anyone any ideea why do I get that error instead of the refreshed 
> access_token?
>
> thanks,
> Nelu
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6456407a-c000-4b2d-89d2-fb87b4239a93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to