Hi there,
I was trying to create ad group ad by referring to these docs - guide1
<https://developers.google.com/google-ads/api/docs/samples/add-expanded-text-ads>
& guide2
<https://developers.google.com/google-ads/api/docs/app-campaigns/create-ad-group>.
I don't quite understand how to add Image and Video assets - for
AdImageAsset what should i put for resource name, is it the url? And for
AdVideoAsset, i tried with the youtube_video_id (11 char id), getting
"RESOURCE_NAME_MALFORMED is malformed: expected
\'customers/{customer_id}/assets/{part_1}\'." error. Could you please
help? Below is my code snippet and my confused part is highlighted in red.
Would be great if you could provide working example.
Thanks, Naomi
AdTextAsset headline =
AdTextAsset.newBuilder()
.setText(StringValue.of(String.format("This is a headline.")))
.build();
AdTextAsset description =
AdTextAsset.newBuilder()
.setText(StringValue.of(String.format("This is a
description.")))
.build();
AdVideoAsset video =
AdVideoAsset.newBuilder()
.setAsset(StringValue.of(String.format("Eq8pzzqq7xE")))
.build();
AppAdInfo appAdInfo = AppAdInfo.newBuilder()
.addHeadlines(headline)
.addDescriptions(description)
.addYoutubeVideos(video)
.build();
// Wraps the info in an Ad object.
Ad ad =
Ad.newBuilder()
.setAppAd(appAdInfo)
.build();
// Builds the final ad group ad representation.
AdGroupAd adGroupAd =
AdGroupAd.newBuilder()
.setAdGroup(StringValue.of(adGroupResourceName))
.setStatus(AdGroupAdStatusEnum.AdGroupAdStatus.ENABLED)
.setAd(ad)
.build();
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c4282181-d71d-4099-8ecf-478ca1780069%40googlegroups.com.