thumbnails

POST /youtube/v3/thumbnails/set

Changed on

Uploads a custom video thumbnail to YouTube and sets it for a video, including YouTube Shorts. When uploading a custom thumbnail for a YouTube Short, call this method only after the video finishes processing (when processingDetails.processingStatus is succeeded). If called before video processing is complete, the custom thumbnail might not be applied to the Short. This method requires a media upload: send the raw binary image data as the media payload to the /upload URI. No JSON metadata body (ThumbnailDetails) is accepted; the empty Request body section applies only to JSON metadata, not the binary media upload. Uploaded files must meet the following requirements: * Maximum file size: 50 MiB (2 MiB for Movies category videos; minimum 4 bytes). Uploads larger than 50 MiB return HTTP 413 uploadTooLarge; uploads smaller than 4 bytes or larger than 2 MiB for Movies videos return HTTP 400 invalidImage. * Accepted media MIME types: image/jpeg, image/png, application/octet-stream For method-specific error responses, see thumbnails.set errors. For code examples, see thumbnails.set code snippets.

Request

  • Base URL
    https://youtube.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtube
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtube
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtube.force-ssl
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtube.force-ssl
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtube.upload
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtube.upload
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtubepartner
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtubepartner

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

videoId, string required

Required. The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.

onBehalfOfContentOwner, string

This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

Response

Successful response

ThumbnailSetResponse required
etag, string

Etag of this resource.

eventId, string

Serialized EventId of the request which produced this response.

items, ThumbnailDetails[]

A list of thumbnails.

kind, string

Identifies what kind of resource this is. Value: the fixed string "youtube#thumbnailSetResponse".

visitorId, string

The visitorId identifies the visitor.

Changes

    • info

      the security scope https://www.googleapis.com/auth/youtube was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/youtube was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/youtubepartner was removed from the endpoint's security scheme Oauth2

    1 more change in this revision