Hello Sama,
Thank you for clarifying this. The AdWords API currently does not support
creating new YoutubeVideoMedia, so you need to manually set the campaign's
YouTube Video assets through the AdWords UI. If you already have existing
youtube media in your account, you will be able to use CampaignService.mutate()
to add new settings to the campaign. You will need to do a MediaService.get()
to get the specific youtube media Id and then use the UniversalAppSetting to
add the new media setting to the campaign. Please find the code snippet below
as a reference:
UniversalAppCampaignSetting universalAppSetting = new
UniversalAppCampaignSetting();
universalAppSetting.setYoutubeVideoMediaIds(new long[] {4390676349L});
campaign.setSettings(new Setting[] {universalAppSetting});
CampaignOperation operation = new CampaignOperation();
operation.setOperand(campaign);
operation.setOperator(Operator.SET);
Let me know if you have any other questions.
Thanks,
Bharani, Google Ads API Team
ref:_00D1U1174p._5001UCZBhj:ref
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/9qb-k000000000000000000000000000000000000000000000PTRKYN00EKrh7vH3T_Kj0sOFeK7BcA%40sfdc.net.