Cant find Callout In Account Level

25 views
Skip to first unread message

Binu Mathew

unread,
Oct 31, 2023, 1:19:36 PM10/31/23
to Google Ads API and AdWords API Forum
Hi

I created Callout using following Code

$asset = new Asset([
            'name' => $data->callout_name,
            'type' => AssetType::CALLOUT,
            'callout_asset' => new CalloutAsset(['callout_text' => $data->callout_text])
        ]);

        // Creates an asset operation.
        $assetOperation = new AssetOperation();
        $assetOperation->setCreate($asset);

        // Issues a mutate request to add the asset.
        $assetServiceClient = $googleAdsClient->getAssetServiceClient();
        $response = $assetServiceClient->mutateAssets(
            $accountId,
            [$assetOperation]
        );

But when i try to get CallOut from following code it showing Null

 $callOutQuery = "SELECT asset.callout_asset.callout_text FROM asset";
        $stream = $googleAdsServiceClient->searchStream($accountId, $callOutQuery);
        foreach ($stream->iterateAllElements() as $googleAdsRow) {
            $newCompete = new \StdClass();
            $newCompete->callout_asset_text = $googleAdsRow->getAsset()->getCallOutAsset()->getCallOutText();
            array_push($callOutText, $newCompete);
        }

Any idea why?

I created CallOUT and it dont show any error, is this CallOut Asset is Accounts Level ?



Google Ads API Forum Advisor

unread,
Oct 31, 2023, 2:32:17 PM10/31/23
to binumat...@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 are trying to create a callout asset using the Google Ads API. After creating the Callout asset, you are receiving a null response. To investigate the issue further, please provide the following details: 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.!5004Q02q9T89:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages