Creating a bumper video ad via api

180 views
Skip to first unread message

Dennis R

unread,
Sep 5, 2023, 4:28:09 AM9/5/23
to Google Ads API and AdWords API Forum
I am currently trying to create a Bumper-Ad(Class: VideoBumperInStreamAdInfo) via the API.I am aware that a corresponding campaign and AdGroup cannot be created via the API, however I have already found posts here in the forum that indicate that it is possible to create bumper ads via the API. For example here: https://groups.google.com/g/adwords-api/c/wD6U0cpAmOk/m/0g7V8CDABQAJI have already created the campaign and AdGroup manually, so they already exist. However, it is unfortunately not possible for me to create the ad. I get the following error message:
Request with ID 'YBFjGTZSFDqguaoSBlXjXQ' has failed.
Mutates are not allowed for the requested resource.
This is the code I am trying to use:

$asset = new Asset([ 'name' => 'Test Asset', 'type' => AssetType::YOUTUBE_VIDEO, 'youtube_video_asset' => new YoutubeVideoAsset([ 'youtube_video_id' => 'YKsQJVzr3a8', ]), ]); $createAsset = (new AssetOperation())->setCreate($asset); $assetResponse = $this->GoogleAdsClient()->getAssetServiceClient()->mutateAssets( USERID, [$createAsset] ); $asset = $assetResponse->getResults()[0]; $adGroupAd = ( new AdGroupAd([ 'ad_group' => $adGroup->getResourceName(), 'status' => AdGroupAdStatus::PAUSED, ]) ) ->setAd(new Ad([ 'display_url' => 'https://www.mydomain.de', 'name' => 'Test', 'final_urls' => ['https://www.mydomain.de'], 'video_ad' => new VideoAdInfo([ 'video' => new AdVideoAsset([ 'asset' => $asset->getResourceName(), ]), 'bumper' => new VideoBumperInStreamAdInfo([ 'action_button_label' => 'testbtnlbl', 'action_headline' => 'testheadline', ]), ]), ])); $createAdGroupAd = (new AdGroupAdOperation())->setCreate($adGroupAd); $adGroupAdResponse = $this->GoogleAdsClient()->getAdGroupAdServiceClient()->mutateAdGroupAds( USERID, [$createAdGroupAd] ); $adGroupAd = $adGroupAdResponse->getResults()[0];
Now how is it possible to add a bumper ad to an AdGroup via the API?If it is not possible via the API, is it possible via the "Bulk Actions Uploads" and if so, how?Many thanks in advance.

Google Ads API Forum Advisor

unread,
Sep 5, 2023, 7:52:31 AM9/5/23
to ifd...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API Forum.

I can see that you are trying to create a video ad via API. However, please note that as per this documentation (https://developers.google.com/google-ads/api/docs/ads/ad-types#ad_type_compatibility), the Google Ads API permits only reporting of video ads. Video campaigns must be created using the UI or Google Ads scripts. Video ads and video campaigns are currently not mutable in Google Ads API. With this, our team has already raised a feature request for this subject for review. What we can do is to advise you to keep an eye on our blog post and release notes for the updates and releases.

Reference Links:

This message is in relation to case "ref:_00D1U1174p._5004Q2oApJq:ref"

Thanks,
 
Google Logo Google Ads API Team


Dennis R

unread,
Sep 5, 2023, 8:21:29 AM9/5/23
to Google Ads API and AdWords API Forum
Can you give me a specific example of how to create a video ad via Google Ads Scripts and/or Bulk Actions Uploads (Excel or CSV)?

Regards

Google Ads API Forum Advisor

unread,
Sep 5, 2023, 12:21:19 PM9/5/23
to ifd...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for returning to our team.

Please note that our team can only provide support to Google Ads API-related concerns and technical implementations. That being said, since this is specific to creating a video ad via Google Ads Scripts, then I would suggest reaching out to the Google Ads Scripts team via this link (https://developers.google.com/google-ads/scripts/docs/support/get-help) as they are better equipped to provide assistance to this matter.
Reply all
Reply to author
Forward
0 new messages