Wednesday, January 4, 2012

[YouTube-API] Re: Malformed request

Hello,

As per http://code.google.com/apis/youtube/2.0/reference.html#YouTube_Category_List:

"In your Upload API request, the value of the <media:category> tag
must be set to the value of the <atom:category> tag's term attribute
for the corresponding category."

The value "Gaming" is the label attribute. The term attribute is
"Games". So you should be using "Games" instead.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Dec 29 2011, 10:08 pm, RJW <ngengui...@gmail.com> wrote:
> I am using a ResumableUploader in VB.NET to upload, but when I start the
> upload, it returns a 400 code with the following:
>
> HTTP/1.1 400 Bad Request
> Server: HTTP Upload Server Built on Dec 13 2011 15:55:44 (1323820544)
> X-GData-User-Country: US
> Content-Type: text/xml; charset=UTF-8
> X-GUploader-UploadID:
> AEnB2UoQLXSm3fWStwi2K1nflid728SLVCMstGQFEXfkFjZVXxyH2wLtp1Y3khBuWcNNDIvI8yd Z7j6j3mXxFHKGsfUHis1QFg
> Date: Fri, 30 Dec 2011 03:03:11 GMT
> Pragma: no-cache
> Expires: Fri, 01 Jan 1990 00:00:00 GMT
> Cache-Control: no-cache, no-store, must-revalidate
> Content-Length: 257
>
> <?xml version='1.0'
> encoding='UTF-8'?><errors><error><domain>yt:validation</domain><code>invali d_value</code><location
> type='xpath'>media:group/media:category[@scheme='http://gdata.youtube.com/schemas/2007/categories.cat']/text()</location></error></errors>
>
> It looks like there is a problem with either the video category. I see no
> problems with the code I have since it practically came out of the google
> documentation. For reference, the line that sets the category is as follows:
> video.Tags.Add(New
> MediaCategory(queue.Items.Item(currentitem).subitems(4).text,
> YouTubeNameTable.CategorySchema))
> It reads from the listview subitem, which I currently have 'Gaming' as the
> category.

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment