Create VideoDiscoveryAd with long YouTube Video name, withHeadline does not work.

21 views
Skip to first unread message

Andrey Nazimov

unread,
Mar 15, 2017, 10:24:14 AM3/15/17
to AdWords API Forum
When i try to create a new VideoDiscoveryAd with long YouTube video title and using short Headline
withHeadline("short title")

, i  get error that the Title is too long.
It means that the method withHeadline does not replace YouTube video title before validation.

How to solve this problem?

My code:

getVideo: function (youTubeVideoId) {
           
var mediaOperation = AdWordsApp.adMedia().newVideoBuilder()
               
.withYouTubeVideoId(youTubeVideoId)
               
.build();
           
var video = mediaOperation.getResult();
           
return video;
       
}

var video = getVideo(youTubeVideoId);

videoAdGroup.newVideoAd().videoDiscoveryAdBuilder()
                   
.withAdName(youTubeVideoId)
                   
.withDescription1(descriptionOne)
                   
.withDescription2(descriptionTwo)
                   
.withHeadline("short title")
                   
.withThumbnail("DEFAULT")
                   
.withDestinationPage("WATCH")
                   
.withVideo(video)
               
.build();

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Mar 15, 2017, 2:40:22 PM3/15/17
to AdWords API Forum
Hi Andrey, 

On this forum, we support queries related to AdWords API. Since your question is related to the AdWords Scripts, could you please post your question on the AdWords Scripts Forum?

Thanks,
Sreelakshmi, AdWords API Team
Reply all
Reply to author
Forward
0 new messages