Hi Richard,

I spoke with our resident *MediaService* expert, and here are the key 
points:

   1. The comment on MediaService.upload 
   
<https://developers.google.com/adwords/api/docs/reference/v201506/MediaService#upload>
 regarding 
   images is correct. You can only *upload* images through the API. 
   However, if you uploaded Audio or Video media objects *through the user 
   interface*, you'll be able to retrieve them via MediaService.get 
   
<https://developers.google.com/adwords/api/docs/reference/v201506/MediaService#get>
    and MediaService.query 
   
<https://developers.google.com/adwords/api/docs/reference/v201506/MediaService#query>
   .
   2. When creating a TrueView template ad 
   
<https://developers.google.com/adwords/api/docs/appendix/templateads#pyv_ad_on_search>,
 
   you should specify the YouTube video ID for the *videoId* field (without 
   the URL -- just the ID).
   3. We're not sure if linking your YouTube and AdWords accounts is 
   required for the TrueView template. I'd recommend just giving it a try 
   without linking to see if you encounter any issues.

Hope that helps!

Cheers,
Josh, AdWords API Team

On Thursday, July 16, 2015 at 7:13:36 PM UTC-4, Richard Biffin wrote:
>
> Hi Josh, are you saying that video uploading is supported? I don't really 
> want to upload I just want to link a YouTube video.
>
> I haven't tried yet because not sure how to do it, with an image you can 
> base64 encode and use the data property of the media object but according 
> to the videos docs there is no data property. How do I tell the 
> MediaService which video to upload or which YouTube video to use.
>
> This is what I currently have but doesn't work and wouldn't really expect 
> it to but not sure what else to try.
>
> service = $api.service(:MediaService, $version)
>     
> video = {
>     type: 'VIDEO',
>     you_tube_video_id_string: params[:video_id],
>     streaming_url: "
> http://youtube.com/get_video?video_id=#{params[:video_id]}";
> }
>
> service.upload([video])
>
> This creates an UnexpectedParametersError: [:you_tube_video_id_string, 
> :streaming_url])
>
> I am looking to create just a regular Adwords campaign with the ad based 
> on the TrueView template (template id 231). Based on the template docs all 
> I need to do is give it a YouTube videoId and an optional videoThumbnail 
> and destinationPage
>
>
> https://developers.google.com/adwords/api/docs/appendix/templateads#pyv_ad_on_search
>
> but this doesn't work, if I leave out the field_media, it starts 
> complaining about required field. So I add in field_media with appropriate 
> properties but it requires a media_id which I can only get from the 
> MediaService, either by uploading (which doesn't work for videos) or 
> creating an ad through the web interface, selecting a YouTube video from 
> the ad gallery TrueView template, in fact you don't have to create the ad, 
> all you have to do is select the YouTube video when starting to create your 
> ad, which looks like it essentially associates the YouTube video to the 
> Adwords account, this video is then part of the MediaService .get 
> collection via the API.
>
> Thanks
> Richard
>
>
>
>
>
>
>
>
>
>
>
>
> On Friday, 17 July 2015 08:36:45 UTC+12, Josh Radcliff (AdWords API Team) 
> wrote:
>>
>> Hi Richard,
>>
>> It may be that the documentation on *MediaService* is outdated. Have you 
>> tried uploading your video via that service and it failed?
>>
>> Also, are you looking to set up these ads for an AdWords for Video 
>> campaign or a regular AdWords campaign? I ask because the AdWords API does 
>> not currently support managing AdWords for Video campaigns.
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Wednesday, July 15, 2015 at 6:25:51 PM UTC-4, Richard Biffin wrote:
>>>
>>> Ok thanks for this. I was hoping to just link a YouTube video as the 
>>> media, not have to upload the video again. I see that the MediaService has 
>>> an upload function which currently only supports images, is there any plan 
>>> to allow uploading of videos in the near future?
>>>
>>> Thanks
>>> Richard
>>>
>>> On Thursday, 16 July 2015 04:38:28 UTC+12, Anthony Madrigal wrote:
>>>>
>>>> Hi Richard,
>>>>
>>>> When creating video template ads 
>>>> <https://developers.google.com/adwords/api/docs/guides/template-ads#video_ads>,
>>>>  
>>>> you will need to use a video that is uploaded through the AdWords UI 
>>>> (since 
>>>> it is not supported through API). You are required to do so since the 
>>>> media 
>>>> ID is used to create the video ad and is used to retrieve video ads 
>>>> through 
>>>> the *MediaService.*
>>>>
>>>> Regards,
>>>> Anthony
>>>> AdWords API Team
>>>>
>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/837e7402-9488-47bb-bf3a-4030d2b75756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to