Fatal error: Uncaught exception 'OAuth2Exception' with message '{ "error" : "invalid_grant" }' ?

782 views
Skip to first unread message

Gungun Septian

unread,
Jan 19, 2014, 9:05:03 PM1/19/14
to adwor...@googlegroups.com
Dear All,

I developing application that integrate with google adwords API. this is my first time. I have problem, when I run my application, that show error like this: 

Fatal error
: Uncaught exception 'OAuth2Exception' with message '{ "error" : "invalid_grant" }' in C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\Common\Util\SimpleOAuth2Handler.php:121 Stack trace: #0 C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\Common\Util\SimpleOAuth2Handler.php(98): SimpleOAuth2Handler->MakeRequest('https://account...', Array) #1 C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\Common\Util\OAuth2Handler.php(113): SimpleOAuth2Handler->RefreshAccessToken(Array) #2 C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\AdWords\Lib\AdWordsSoapClient.php(70): OAuth2Handler->GetOrRefreshAccessToken(Array) #3 [internal function]: AdWordsSoapClient->__doRequest('<?xml version="...', 'https://adwords...', '', 1, 0) #4 C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\Common\Lib\AdsSoapClient.php(216): SoapClient->__soapCall('get', Array, NULL, Array, Array) #5 C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\AdWords\v201309\CampaignService.php(6208): AdsSoapClient->__soapCall('get in C:\xampp\htdocs\google-api\adwords\src\Google\Api\Ads\Common\Util\SimpleOAuth2Handler.php on line 121

What's wrong? and what should I do?

Thank You

Danial Klimkin

unread,
Jan 23, 2014, 7:27:16 AM1/23/14
to adwor...@googlegroups.com
Hello Gungun,


As a first step, please check out this OAuth2 setup video:



-Danial, AdWords API Team.

Emanuel Bolnavu

unread,
Sep 8, 2014, 6:26:54 AM9/8/14
to adwor...@googlegroups.com
You solved the problem?
thank you!

Susan

unread,
Jun 15, 2015, 3:06:00 AM6/15/15
to adwor...@googlegroups.com
Hi Gungun,

Did you resolve it yet?
How? I have the same issue with you and I have already watched the video from Danial and still cannot fix this issue. Please help.

Thanks,
Susan

Danial Klimkin

unread,
Jun 15, 2015, 1:22:17 PM6/15/15
to adwor...@googlegroups.com, su...@bigevo.com
Hi Susan,


Please outline the exact steps you are making. I suggest creating a new thread to avoid extra emails for original topic starter.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages