I am calling MediaService.upload and trying to set up a youtube video, I am getting an error.

95 views
Skip to first unread message

jia zheng

unread,
Aug 3, 2018, 5:42:04 AM8/3/18
to AdWords API and Google Ads API Forum
I am calling MediaService.upload and trying to set up a youtube video, I am getting an error.

<x:Body> 
    <v:upload> 
      <v:media xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:Video">  
        <v:type>VIDEO</v:type>  
        <v:youTubeVideoIdString>https://www.youtube.com/watch?v=N89Bjp6SZ70</v:youTubeVideoIdString> 
      </v:media> 
    </v:upload>
  </x:Body>

I get a error like :
[MediaError.UNSUPPORTED_TYPE @ media[0]]   

why ??
with annex
I am calling MediaService.upload and trying to set up a youtube video, I am getting an error.png

Bharani Cherukuri (AdWords API Team)

unread,
Aug 3, 2018, 3:44:31 PM8/3/18
to AdWords API and Google Ads API Forum
Hello Jia, 

The error UNSUPPORTED_TYPE indicates that the specified type is not supported. Based on the discussion on this thread, it looks like you're uploading the videos for UACs. The AdWords API currently doesn't support creating YoutubeVideoMedia so you need to manually set the campaign's YouTube Video assets through the AdWords UI. If you already have the Youtube media in your account, you will be able use the MediaService.get() and retrieve the MediaId of the youtubeMedia and link it to the UAC campaign as shown here. Code samples in other languages can be found here

Thanks,
Bharani, AdWords API Team
Reply all
Reply to author
Forward
0 new messages