V21GoogleAdsClientBuilder error

139 views
Skip to first unread message

Teun Roos

unread,
Nov 30, 2023, 9:12:50 PM11/30/23
to Google Ads API and AdWords API Forum
Hi all,
This is my first time playing around with the Google Ads API. 
I have the following in my code;

use Google\Ads\GoogleAds\Lib\V21\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\V21\Enums\SearchTermMatchTypeEnum\SearchTermMatchType;
use Google\Ads\GoogleAds\V21\Services\GoogleAdsRow;

It's giving me the following error;

Uncaught Error: Class "Google\Ads\GoogleAds\Lib\V21\GoogleAdsClientBuilder" not found in /var/www/html/wp-content/plugins/organic search v2/ga-analytics-plugin.php:396 Stack trace: #0 /var/www/html/wp-content/plugins/organic search v2/ga-analytics-plugin.php(66): fetch_google_ads_data() #1 /var/www/html/wp-includes/class-wp-hook.php(324): ga_search_terms_page() #2 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #3 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /var/www/html/wp-admin/admin.php(259): do_action() #5 {main} thrown in /var/www/html/wp-content/plugins/organic search v2/ga-analytics-plugin.php on line 396

Would anyone happen to know why the error shows up? 
Is GoogleAdsClientBuilder no longer available?

Google Ads API Forum Advisor

unread,
Dec 1, 2023, 5:08:50 AM12/1/23
to roos....@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your query, I understand that you are getting an "Uncaught Error" via Google Ads API. In order to investigate further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag. 

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qW0wA:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages