GetGeoTargetConstantsByNames is failing

64 views
Skip to first unread message

Aviran Zazon

unread,
Dec 27, 2023, 12:07:07 PM12/27/23
to Google Ads API and AdWords API Forum
Hi,
Been with Ads API for a long time now, but I came across something weird.
I literally took 
And it fails with:

Fatal error: Uncaught TypeError: Google\Ads\GoogleAds\V15\Services\Gapic\GeoTargetConstantServiceGapicClient::suggestGeoTargetConstants(): Argument #1 ($optionalArgs) must be of type array, Google\Ads\GoogleAds\V15\Services\SuggestGeoTargetConstantsRequest given, called in C:\Users\avixa\GitHub\ca-ads-api\createCampaign\getGeoTargetConstByNames.class.php on line 117 and defined in C:\Users\avixa\GitHub\php_include\google-ads-php\src\Google\Ads\GoogleAds\V15\Services\Gapic\GeoTargetConstantServiceGapicClient.php:203


I tried so many variations to make this work until I reverted to the original example, and it's just odd.
Thanks,
Aviran.

Google Ads API Forum Advisor

unread,
Dec 27, 2023, 4:05:11 PM12/27/23
to doe...@gmail.com, adwor...@googlegroups.com
Hi,

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

By reviewing your concern, I understand that you have issues with the GeoTargetConstantService. The logs you have provided are incomplete. Could you please provide us with the complete API logs (request and response with request-id and request header) to investigate this issue further on our end.

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, .Net, PHP, Python, Ruby 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.!5004Q02r3v5Q:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages