PHP client - calling hanging on GRPC, working on REST

178 views
Skip to first unread message

William Turrell

unread,
May 9, 2023, 2:48:16 PM5/9/23
to Google Ads API and AdWords API Forum
Hello,

Is there a reason a fairly straightforward API call would work in REST transport but just hang with GRPC (no errors or entries in the log file, it just freezes)?

Here's the basic code - it gets stuck on the call to mutateKeywordPlans (this is before creating a Campaign, AdGroup and actually supplying any keywords…)

I'm up to date with the client library versions, running PHP 8.1 etc and its the same on dev (macOS) and production (Debian).

Thanks,
William

$keywordPlan = new KeywordPlan([
'name' => $title,
'forecast_period' => new KeywordPlanForecastPeriod([
'date_interval' => KeywordPlanForecastInterval::NEXT_QUARTER
])
]);

$keywordPlanOperation = new KeywordPlanOperation();
$keywordPlanOperation->setCreate($keywordPlan);

$keywordPlanServiceClient = $googleAdsClient->getKeywordPlanServiceClient();
$response = $keywordPlanServiceClient->mutateKeywordPlans($customerId, [$keywordPlanOperation]);

Google Ads API and AdWords API Forum

unread,
May 11, 2023, 8:52:53 AM5/11/23
to Google Ads API and AdWords API Forum
Re-posting the last inquiry (https://groups.google.com/g/adwords-api/c/xAqu4gTqsgk) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads API Team

Google Ads API Forum Advisor

unread,
May 11, 2023, 10:42:02 AM5/11/23
to adwor...@googlegroups.com

Hi, 

Thanks for reaching out to the Google Ads API Team. I hope you are doing well today.

With regards to your concern, could you please confirm to us what version you are using for Google Ads API with PHP 8.1? In addition, please note that Google Ads API version 13 is for PHP 18.0.0, see Client library documentation.

For more information, you may also see Google Ads API: The PHP Client Library and Transport full documentation and guidelines.

However, if issues still persist after following the guidelines, for our team to further compare, investigate, and validate why you are encountering issues, can you provide more information?
 

  • Provide the complete (request and response with request-id) logs with request ID generated as shown in the respective links.
  • Complete or uncropped screenshots from the Google Ads UI (optional)


We do this to check if there’s an error thrown on your side and provide accurate recommendations. 

If you haven't enabled logging yet, it can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

You can provide these via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Reference links:


Have a great day.

Regards,

Google Logo Google Ads API Team


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