How do I get information about a created or updated ad using Batch processing (PHP)?

36 views
Skip to first unread message

Влад Дигтяренко

unread,
Nov 13, 2020, 10:33:30 AM11/13/20
to AdWords API and Google Ads API Forum
Hi,

I am guided by the usage flow (https://developers.google.cn/google-ads/api/docs/batch-processing/flow#php) and it works well.

But when I iterate over batch results I cannot access the ad and find out (for example) its id.

$batchJobResult->getMutateOperationResponse()->getResponse() // 'ad_result' (after update operation)

$batchJobResult->getMutateOperationResponse()->getAdResult() // {Google\Ads\GoogleAds\V5\Services\MutateAdResult} [0]

$batchJobResult->getMutateOperationResponse()->getAdResult()->getAd() // always null 

$batchJobResult->getMutateOperationResponse()->getAdResult()->getResourceName() // works well, but is this really the only way to get the id?

Help me please :)

Влад Дигтяренко

unread,
Nov 13, 2020, 10:44:38 AM11/13/20
to AdWords API and Google Ads API Forum
Question is about Google Ads API v5

пятница, 13 ноября 2020 г. в 17:33:30 UTC+2, Влад Дигтяренко:

Google Ads API Forum Advisor Prod

unread,
Nov 15, 2020, 8:58:46 PM11/15/20
to vlad.dig...@gmail.com, adwor...@googlegroups.com
Hi,

You may refer to this step as it discussed listing all batch job results. If you encountered any issues with this step, please provide the following details via Reply privately to author option to investigate.
  • customer ID
  • request ID
  • complete request and response logs

You may also enable logging the API transactions in PHP client library by following this guide.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


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