A developer token must be set.

490 views
Skip to first unread message

Alef Felipe

unread,
Nov 4, 2021, 8:20:14 AM11/4/21
to AdWords API and Google Ads API Forum
I'm getting this error when making a test request.

But my developer token has already been defined in google_ads_php.ini

file location

/home/user/google_ads_php.ini

Anyone have a suggestion?

Alef Felipe

unread,
Nov 4, 2021, 8:24:44 AM11/4/21
to AdWords API and Google Ads API Forum
PHP Fatal error:  Uncaught InvalidArgumentException: A developer token must be set. in /opt/lampp/htdocs/google-ads-php/src/Google/Ads/GoogleAds/Lib/V8/GoogleAdsClientBuilder.php:255
Stack trace:
#0 /opt/lampp/htdocs/google-ads-php/src/Google/Ads/GoogleAds/Lib/V8/GoogleAdsClientBuilder.php(236): Google\Ads\GoogleAds\Lib\V8\GoogleAdsClientBuilder->validate()
#1 /opt/lampp/htdocs/google-ads-php/examples/BasicOperations/GetCampaigns.php(56): Google\Ads\GoogleAds\Lib\V8\GoogleAdsClientBuilder->build()
#2 /opt/lampp/htdocs/google-ads-php/examples/BasicOperations/GetCampaigns.php(120): Google\Ads\GoogleAds\Examples\BasicOperations\GetCampaigns::main()
#3 {main}
  thrown in /opt/lampp/htdocs/google-ads-php/src/Google/Ads/GoogleAds/Lib/V8/GoogleAdsClientBuilder.php on line 255

Alef Felipe

unread,
Nov 4, 2021, 10:12:01 AM11/4/21
to AdWords API and Google Ads API Forum
Resolvido alterando o [ADWORDS] para [GOOGLE_ADS]

Google Ads API Forum Advisor

unread,
Nov 5, 2021, 12:18:24 PM11/5/21
to aleffeli...@gmail.com, adwor...@googlegroups.com

Hello,

Thanks for reaching out to the Google Ads API support team. I saw your recent mail as you mentioned “Resolved by changing [ADWORDS] to [GOOGLE_ADS]”.

Yes, that is the correct solution If you have the adsapi_php.ini file you used for the AdWords API, copy and name it as google_ads_php.ini. Simply change the section name from [ADWORDS] to [GOOGLE_ADS].

Could you please confirm if anything else, we can assist you?

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team

 



 

ref:_00D1U1174p._5004Q2R6Gal:ref
Reply all
Reply to author
Forward
0 new messages