30th May 2008

YouTube API Video Upload

For my latest project I had to work with the new YouTube API. Let us just say the documentation could be improved. It is not that the information is not there, but there is a lack of cross referencing and if you jump to a particular sample, there seems to be the assumption that you have read other parts of the documentation and sometimes they refer to relevant sections, sometimes they do not. And some things are just left out entirely.

For example, the PHP API documentation shows you how to generate the file browse form, but does not mention (aside from a comment in the code about white space in the keywords) the restrictions on the inputs for the form that you would have to submit prior to getting to this point. Some of these include:

  • The < and > characters will cause an error if included in any of the inputs.
  • Submitting a single character keyword will cause an error.
  • The category select form items must have certain values, you can not simply submit the actual text representation of the category.
  • Description is limited to 5000 characters.
  • Total keyword string length can not exceed 120 characters and a single key word can not be over 25 characters.

These can be found elsewhere in the documentation, but again a link to relevant information in the actual PHP example could have saved me a lot of searching and time.

That being said, we did finally get it working (I think).

One Response to “YouTube API Video Upload”

  1. Tim Says:

    How about the max “Title” length? Been trying to figure that out..