Keep getting invalid_grant errors

33 views
Skip to first unread message

Martijn

unread,
Sep 8, 2015, 9:01:23 AM9/8/15
to AdWords API Forum
Hi there,

I'm trying out the Adwords API and have downloaded the latest version of the PHP lib. I'm having some trouble with making a request:

I'm stuck on step 4:  run the GetCampaigns.php example.

When I run this page I get the following error: 

An error has occurred: { "error" : "invalid_grant" }

I've found a lot of solution on stack overflow but none seem to work for me. 

- I have generated a "OAuth 2.0 client ID" from which I have set to "Other" and entered this into the auth.ini file. 
- Then I generated a refresh token with "/examples/AdWords/Auth/GetRefreshToken.php".
- After accepting with my Google account (same account) I enter the token in the auth.ini file.
- I run GetCampaigns.php and get the above error

- I've also tried a "web application" type but then I get an error when trying to connect with my Google account


 


Umesh Dengale

unread,
Sep 8, 2015, 4:52:19 PM9/8/15
to AdWords API Forum
Hello,

Could you verify that you followed all steps given in the PHP OAuth2.0 guide? Please check out our PHP OAuth2.0 guide for more details. If the issue exists then please provide the SOAP XML request and response logs. Just click Reply privately to author in the forum when responding. Don't forget to remove the developer token in the output.

Cheers,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages