Hello support,

I'm trying to create an ad with the following code. The asset is created 
successfully, the ad is also created successfully. However, the line 
"videoAdOperation.getResult()" does not return anything, no result, not 
exception, nothing. The code just stops continuing. Could you help on this?

thanks!

        const assetOperation = 
AdsApp.adAssets().newYouTubeVideoAssetBuilder()
            .withName(assetName)
            .withYouTubeVideoId(assetVideoId)
            .build();

          Logger.log("Asset operation initiated");

          try {
            asset = assetOperation.getResult();
            
            if (asset) {
              Logger.log("Asset id is " + asset.getId());
              videoAdOperation = adGroup.newVideoAd()
                .nonSkippableAdBuilder()
                .withAdName(adName)
                .withDisplayUrl(videoDisplayUrl)
                .withFinalUrl(videoFinalUrl)
                .withVideo(asset)
                .build();

              Logger.log("New video ad creation initiated");
              
              videoAd = videoAdOperation.getResult();
              Logger.log("New ad created, ad id is " + videoAd.getId());
            } else {
              Logger.log("Asset is null or undefined");
            }
          } catch (e) {
            Logger.log("Error: " + e.message);
          }

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b0b39e45-3034-438f-9353-343b06a984ecn%40googlegroups.com.

Reply via email to