Hi,

I'm afraid video media are currently not supported for uploading via the 
API. However, you could upload your videos using the AdWords UI. Once done 
uploading your videos via UI, you could get their mediaId 
<https://developers.google.com/adwords/api/docs/reference/v201806/MediaService.Video#mediaid>
 using 
the MediaService.get() 
<https://developers.google.com/adwords/api/docs/reference/v201806/MediaService#get>
 and 
set them to your UACs youtubeVideoMediaIds 
<https://developers.google.com/adwords/api/docs/reference/v201806/CampaignService.UniversalAppCampaignSetting#youtubevideomediaids>
.

Let me know if you have further clarifications.

Thanks and regards,
Luis
AdWords API Team

On Friday, September 14, 2018 at 3:35:36 PM UTC+8, Миша Васильев wrote:
>
> Hello! I can't create a video 
> <https://developers.google.com/adwords/api/docs/reference/v201802/AdGroupAdService.Video>
>  
> for a universal campaign. I use .Net library v201806. I use the following 
> code: 
>
> public static long[] UploadYoutubeVideo()
> {
>     var videos = new List<string> { "RHwYAB2plr8" };
>     using (var mediaService = ServiceFactory.GetMediaService())
>     {        
>         var media = new Media[videos.Count];
>         for (var i = 0; i < videos.Count; i++)
>         {
>             media[i] = new Video
>             {
>                 youTubeVideoIdString = videos[i],
>                 type = MediaMediaType.VIDEO
>             };
>         }
>         return (from video in mediaService.upload(media) select 
> video.mediaId).ToArray();
>     }
> }
>
>
> *Request: * 
> <?xml version="1.0" encoding="utf-16"?> <s:Envelope xmlns:s="
> http://schemas.xmlsoap.org/soap/envelope/";> <s:Header> <RequestHeader 
> xmlns="https://adwords.google.com/api/adwords/cm/v201806";> 
> <clientCustomerId>XXX-XXX-XXXX</clientCustomerId> 
> <developerToken>-------------------------</developerToken> 
> <userAgent>unknown (AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
> CLR/4.0.30319.42000, , gzip)</userAgent> </RequestHeader> </s:Header> 
> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema";> <upload xmlns="
> https://adwords.google.com/api/adwords/cm/v201806";> <media 
> xsi:type="Video"> <type>VIDEO</type> 
> <youTubeVideoIdString>RHwYAB2plr8</youTubeVideoIdString> </media> </upload> 
> </s:Body> </s:Envelope> *Error*: The specified type is not supported.. 
> (Error: MediaError.UNSUPPORTED_TYPE, FieldPath: media[0], Trigger: )
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
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/e980cac2-69a5-4dcc-841b-e21a8b90782a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Миша Васильев
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to