Our /youtube/store Robot

Export files to YouTube

🤖/youtube/store exports encoding results to YouTube.

Note: This Robot only accepts videos.

Installation

Since YouTube works with OAuth, you will need to generate Template Credentials to use this Robot.

To change the title, description, category, or keywords per video, we recommend to inject variables into your Template.

Adding a thumbnail image to your video

You can add a custom thumbnail to your video on YouTube by using our "as" syntax for the "use" parameter to supply both a video and an image to the step:

"exported": {
  "use": [
    { "name": "video_encode_step", "as": "video" },
    { "name": "image_resize_step", "as": "image" },
  ],
  ...
},

If you encounter an error such as "The authenticated user doesnʼt have permissions to upload and set custom video thumbnails", you should go to your YouTube account and try adding a custom thumbnail to one of your existing videos. Youʼll be prompted to add your phone number. Once youʼve added it, the error should go away.

Usage example

Export an uploaded video to YouTube and set some basic parameters:

{
  "steps": {
    "exported": {
      "robot": "/youtube/store",
      "use": ":original",
      "credentials": "YOUR_YOUTUBE_CREDENTIALS",
      "title": "Transloadit: Video Example",
      "description": "Some nice description",
      "category": "science & technology",
      "keywords": "transloadit, robots, botty",
      "visibility": "private"
    }
  }
}

Parameters

  • use

    String / Array of Strings / Object required

    Specifies which Step(s) to use as input.

    • You can pick any names for Steps except ":original" (reserved for user uploads handled by Transloadit)

    • You can provide several Steps as input with arrays:

      "use": [
        ":original",
        "encoded",
        "resized"
      ]
      

    💡 That’s likely all you need to know about use, but you can view Advanced use cases.

  • credentials

    Stringrequired

    The authentication Template credentials used for your YouTube account. You can generate them on the Template Credentials page. Simply add the name of your YouTube channel, and you will be redirected to a Google verification page. Accept the presented permissions and you will be good to go.

  • title

    Stringrequired

    The title of the video to be displayed on YouTube.

    Note that since the YouTube API requires titles to be within 80 characters, longer titles may be truncated.

  • description

    Stringrequired

    The description of the video to be displayed on YouTube. This can be up to 5000 characters, including \n for new-lines.

  • category

    Stringrequired

    The category to which this video will be assigned. These are the valid values: "autos & vehicles", "comedy", "education", "entertainment", "film & animation", "gaming", "howto & style", "music", "news & politics", "people & blogs", "pets & animals", "science & technology", "sports", "travel & events",

  • keywords

    Stringrequired

    Tags used to describe the video, separated by commas. These tags will also be displayed on YouTube.

  • visibility

    Stringrequired

    Defines the visibility of the uploaded video. This can be "public", "private", or "unlisted".

Note: The URLs in the result JSON already point to the file on your target storage platform, so you can just save that URL in your database.

Demos

Related blog posts