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 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a279d2e6-a921-4de0-b29f-bf61a469993f%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