How to add YouTube video to UniversalAppCampaignInfo?

34 views
Skip to first unread message

Mohammad Reza Kiani

unread,
Apr 11, 2019, 6:01:50 AM4/11/19
to AdWords API and Google Ads API Forum
Hello
I have used youtube API to add a video on YouTube and it uploads the video successfully. Then I have the YouTubeId which is a string and is what you see in a YouTube URL when you watch a video.
But my problem is I don't know how to convert this to MediaId to add it to UniversalAppCampaignInfo. I searched a lot but I couldn't find anything helpful so I decided to ask here.
How can I achieve MediaId from a YouTubeId?
Thank you for your help

googleadsapi...@google.com

unread,
Apr 11, 2019, 6:26:04 AM4/11/19
to adwor...@googlegroups.com
Hi Mohammad,

You would first need to setup your YouTube video assets directly via the Google Ads UI and once you have done so, you can then use the MediaService.get() to retrieve the mediaId which you can then use to specify in the youtubeVideoMediaIds field. Let me know if this helps.

Thanks and regards,
Peter
Google Ads API Team

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
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/cc4877cb-7404-48b1-bdf9-94ca1f4b996b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages