Error "unauthorized_client" when trying to get the campaign data with Google Adwords v201502

1,281 views
Skip to first unread message

Susan

unread,
Jun 17, 2015, 11:33:58 PM6/17/15
to adwor...@googlegroups.com
Can someone please help with the issue on my adwords tool development?
I am still creating my adwords tool with code igniter in PHP.

These are my step:
1. I already got my approved developer token
2. I have created the Client ID from here -> https://console.developers.google.com
3. Once I have got my Client ID and my Client Secret I copied to the auth.ini file
4. I run the GetRefreshToken.php (I got it from online), I used my terminal to get refresh token.
5. After I have got my refresh token I run my script on http://best.bigevo.com/adwords, and I have this kind of error.

I have this error:
Fatal error: Uncaught exception 'OAuth2Exception' with message '{ "error" : "unauthorized_client" }' in /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php:124 Stack trace: #0 /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php(100): SimpleOAuth2Handler->MakeRequest('https://account...', Array) #1 /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Util/OAuth2Handler.php(113): SimpleOAuth2Handler->RefreshAccessToken(Array) #2 /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php(502): OAuth2Handler->GetOrRefreshAccessToken(Array) #3 /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php(214): AdsSoapClient->GenerateHttpHeaders() #4 /home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/AdWords/v201502/CampaignS in/home/content/55/11063355/html/best/app0809/third_party/Adwords/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php on line 124


I wish someone would help me.

Thanks,
Susan

Umesh Dengale

unread,
Jun 18, 2015, 1:48:50 PM6/18/15
to adwor...@googlegroups.com, su...@bigevo.com
Hi Susan,

Please go through these steps and run any of the examples using the refresh token. If you get any exceptions, please provide me the SOAP request and response. Just click Reply privately to author in the forum when responding.

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