0down votefavorite
<http://stackoverflow.com/questions/38539139/what-should-be-the-final-url-and-display-url-to-create-trueview-in-search-video#>
I am trying to create TrueView in-search video ad using adwords api with
code as below and it does not accept display URL, i tried with different
combination of display URL but error is still the same. Here is the code
TemplateAd videoAd = new TemplateAd();
videoAd.setName("vidoolyVideoAd");
videoAd.setTemplateId(231l);
videoAd.setFinalUrls(new String[] {"https://youtu.be/jbGkBDIMBW4"});
videoAd.setDisplayUrl("www.vidooly.com");
TemplateElementField headline = new TemplateElementField();
headline.setName("headline");
headline.setType(TemplateElementFieldType.TEXT);
headline.setFieldText("kuchViBol");
TemplateElementField videoId = new TemplateElementField();
videoId.setName("videoId");
videoId.setType(TemplateElementFieldType.VIDEO);
videoId.setFieldText("https://youtu.be/jbGkBDIMBW4");
TemplateElementField channelName = new TemplateElementField();
channelName.setName("channelName");
channelName.setType(TemplateElementFieldType.TEXT);
channelName.setFieldText("youtube.com/Google");
TemplateElementField imageUrl = new TemplateElementField();
imageUrl.setName("imageUrl");
imageUrl.setType(TemplateElementFieldType.URL);
imageUrl.setFieldText("http://vidooly.com/resources/v1/images/vidooly-yt-logo.png");
TemplateElement adData = new TemplateElement();
adData.setUniqueName("adData");
adData.setFields(new TemplateElementField[] {headline,
videoId,imageUrl});
videoAd.setTemplateElements(new TemplateElement[] {adData});
AdGroupAd html5AdGroupAd = new AdGroupAd();
html5AdGroupAd.setAdGroupId(28619480966l);
html5AdGroupAd.setAd(videoAd);
// Optional: Set the status.
html5AdGroupAd.setStatus(AdGroupAdStatus.PAUSED);
// Create the operation.
AdGroupAdOperation operation = new AdGroupAdOperation();
operation.setOperator(Operator.ADD);
operation.setOperand(html5AdGroupAd);
AdGroupAdReturnValue result = adGroupAdService.mutate(new
AdGroupAdOperation[] {operation});
followings is the error code [AdError.INVALID_YOUTUBE_DISPLAY_URL @
operations[0].operand.ad.displayUrl
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/fe684c81-e972-4c6a-8ead-47e1e3054823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.