Hi Alex,
It seems that you're using the response code as the refresh token. You
should exchange the code for a refresh_token and an access_token. The
refresh_token you keep, the access_token you use for up to 1 hour.
Regards,
- Paul, AdWords API Team.
On Monday, 26 August 2013 16:18:02
Hello Paul,
I've run the GetRefreshToken example and added the refresh_token in the
auth.ini but if I execute my script I always get the invalid_grand error.
But it works when I try to access adwords with curl on the command-line and
using the same refresh_token. I don't get it.
Here my code:
Hello Paul,
Thanks for your reply.
I've run the GetRefreshToken.php and got an URL back with the text that I
should open it in the browser.
On that URL I got a token, so that script works perfectly.
Any other idea?
Regards,
Jur
Op donderdag 15 augustus 2013 17:33:24 UTC+2 schreef Paul
Can you confirm that you've both followed the instructions in the OAuth2
Wiki page https://code.google.com/p/google-api-adwords-php/wiki/OAuth2?
Specifically the part about running the GetRefreshToken.php
Hello Alex,
I've the exact same problem.
Were you able to generate a refresh_token with the GetRefreshToken.php
script?
I was able to do this, but can't get any campaign list visible without the
invalid grant error.
Did you find a solution?
Regards,
Jur
Op woensdag 7 augustus 2013 17:11:18
Hi,
i setted up a PHP script to connect to Adwords API.
By using the $campaignService-get($selector) method I get always the error
invalid_grant.
Here the Stack Trace: