> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/social-media/you-tube.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# YouTube

YouTube is a video platform. Manage playlists, comments, captions, channel sections and live broadcasts.

![YouTube logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-2103385572444fbc867b9c955201a583608cafe3%2Fyou-tube.png?alt=media)

|                    |                                                                          |
| ------------------ | ------------------------------------------------------------------------ |
| **Category**       | [Social media](https://docs.fastn.ai/connectors/catalog/social-media.md) |
| **Website**        | [youtube.com](https://youtube.com)                                       |
| **Authentication** | OAuth 2.0                                                                |
| **Slug**           | `youTube`                                                                |
| **On fastn.ai**    | [Embed YouTube in your product](https://fastn.ai/integrations/youtube)   |

## Setup

Your customers sign in to YouTube through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect YouTube from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **YouTube**.
2. Select **Connect** on the YouTube card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to YouTube and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use YouTube's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Add Playlist Image</td><td><code>insertPlaylistImage</code></td><td>Upload a custom image for a playlist you own (playlistImages.insert, type hero). Image is sent base64 in a multipart/related body; Fastn currently caps execute bodies at 8 KB, so only small images work today.</td></tr><tr><td>Add Playlist Item</td><td><code>addPlaylistItem</code></td><td>Adds a resource (typically a video) to a playlist.</td></tr><tr><td>Bind Live Broadcast</td><td><code>bindLiveBroadcast</code></td><td>Bind a broadcast to a video stream (liveBroadcasts.bind).</td></tr><tr><td>Create Channel Section</td><td><code>createChannelSection</code></td><td>Adds a channel section to the authenticated user's channel.</td></tr><tr><td>Create Comment</td><td><code>createComment</code></td><td>Creates a reply to a comment thread.</td></tr><tr><td>Create Comment Thread</td><td><code>createCommentThread</code></td><td>Creates a new top-level comment on a video.</td></tr><tr><td>Create Live Broadcast</td><td><code>insertLiveBroadcast</code></td><td>Schedule a live broadcast (liveBroadcasts.insert). Needs live streaming enabled on the channel. Returns the broadcast with its id.</td></tr><tr><td>Create Live Stream</td><td><code>insertLiveStream</code></td><td>Create a video stream with RTMP ingestion (liveStreams.insert). Returns stream key and ingestion address in cdn.</td></tr><tr><td>Create Playlist</td><td><code>createPlaylist</code></td><td>Creates a playlist.</td></tr><tr><td>Create Third-Party Link</td><td><code>insertThirdPartyLink</code></td><td>Creates a link between the authenticated YouTube channel and a third-party account (YouTube Data API thirdPartyLinks.insert), e.g. a Google Merchant Center store (channelToStoreLink) for YouTube Shopping or a partner affiliate program (channelToAffiliateProgramLink). Google scope: youtube.third-party-link.creator. Intended for approved YouTube Shopping/affiliate partners; other callers get a 403. Remove it with Delete Third-Party Link. Returns the created link with its linkingToken and status.</td></tr></tbody></table>

<details>

<summary>View 60 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Delete Caption</td><td><code>deleteCaption</code></td><td>Deletes one or more caption tracks.</td></tr><tr><td>Delete Channel Section</td><td><code>deleteChannelSection</code></td><td>Deletes a channel section.</td></tr><tr><td>Delete Comment</td><td><code>deleteComment</code></td><td>Deletes a comment.</td></tr><tr><td>Delete Live Broadcast</td><td><code>deleteLiveBroadcast</code></td><td>Delete a live broadcast (liveBroadcasts.delete).</td></tr><tr><td>Delete Live Chat Message</td><td><code>deleteLiveChatMessage</code></td><td>Delete a live chat message (liveChatMessages.delete).</td></tr><tr><td>Delete Live Stream</td><td><code>deleteLiveStream</code></td><td>Delete a video stream (liveStreams.delete).</td></tr><tr><td>Delete Playlist</td><td><code>deletePlaylist</code></td><td>Deletes a playlist.</td></tr><tr><td>Delete Playlist Image</td><td><code>deletePlaylistImage</code></td><td>Delete a playlist image (playlistImages.delete).</td></tr><tr><td>Delete Playlist Item</td><td><code>deletePlaylistItem</code></td><td>Deletes a playlist item.</td></tr><tr><td>Delete Subscription</td><td><code>deleteSubscription</code></td><td>Deletes a subscription.</td></tr><tr><td>Delete Third-Party Link</td><td><code>deleteThirdPartyLink</code></td><td>Deletes (unlinks) a third-party link of the authenticated YouTube channel by linking token and link type (YouTube Data API thirdPartyLinks.delete). Google scope: youtube.third-party-link.creator. Returns an empty body on success.</td></tr><tr><td>Delete Video</td><td><code>deleteVideo</code></td><td>Deletes a YouTube video.</td></tr><tr><td>Download Caption</td><td><code>downloadCaption</code></td><td>Download a caption track you own (captions.download, alt=media). Leave tfmt empty to get the file in its uploaded format; YouTube may answer 400 "Unsupported Output Format" when asked to convert an uploaded track. Returns {name, mime, size, data} where data is the file as base64.</td></tr><tr><td>Get Video Analytics Report</td><td><code>getVideoAnalyticsReport</code></td><td>Retrieves YouTube Analytics report data for a channel or content owner. Uses the YouTube Analytics API.</td></tr><tr><td>Get Video Rating</td><td><code>getVideoRating</code></td><td>Retrieves the ratings that the authorized user gave to a list of specified videos.</td></tr><tr><td>List Activities</td><td><code>listActivities</code></td><td>Returns a list of channel activity events that match the request criteria.</td></tr><tr><td>List Captions</td><td><code>listCaptions</code></td><td>Returns a list of caption tracks that are associated with a specified video.</td></tr><tr><td>List Channel Sections</td><td><code>listChannelSections</code></td><td>Returns a list of channelSection resources that match the API request criteria.</td></tr><tr><td>List Channels</td><td><code>listChannels</code></td><td>Returns a collection of zero or more channel resources matching the request criteria.</td></tr><tr><td>List Comment Threads</td><td><code>listCommentThreads</code></td><td>Returns a list of comment threads matching the API request parameters.</td></tr><tr><td>List Comments</td><td><code>listComments</code></td><td>Returns a list of comments matching the API request parameters.</td></tr><tr><td>List Content Owners</td><td><code>listContentOwners</code></td><td>Retrieves the YouTube content owners (CMS partners) that the authenticated user is linked to. Read-only. Requires the youtubepartner scope.</td></tr><tr><td>List I18n Languages</td><td><code>listI18nLanguages</code></td><td>Returns a list of application languages that the YouTube website supports.</td></tr><tr><td>List I18n Regions</td><td><code>listI18nRegions</code></td><td>Returns a list of content regions that the YouTube website supports.</td></tr><tr><td>List Live Broadcasts</td><td><code>listLiveBroadcasts</code></td><td>List the connected channel's live broadcasts (liveBroadcasts.list) filtered by broadcastStatus: all, active, completed or upcoming. Needs live streaming enabled on the channel.</td></tr><tr><td>List Live Chat Messages</td><td><code>listLiveChatMessages</code></td><td>List messages in a live chat (liveChatMessages.list). liveChatId comes from the broadcast snippet.liveChatId.</td></tr><tr><td>List Live Streams</td><td><code>listLiveStreams</code></td><td>List the channel's video streams (liveStreams.list, mine=true), including ingestion info.</td></tr><tr><td>List Managed Channels</td><td><code>listManagedChannels</code></td><td>Lists channels managed by the content owner the authenticated user is linked to (managedByMe). Read-only. Requires the youtubepartner scope.</td></tr><tr><td>List Members</td><td><code>listMembers</code></td><td>Lists members of a channel (YouTube Memberships feature). Requires youtube.channel-memberships.creator scope.</td></tr><tr><td>List Membership Levels</td><td><code>listMembershipLevels</code></td><td>Lists membership levels defined for a channel. Requires youtube.channel-memberships.creator scope.</td></tr><tr><td>List Playlist Images</td><td><code>listPlaylistImages</code></td><td>List the custom images of a playlist (playlistImages.list).</td></tr><tr><td>List Playlist Items</td><td><code>listPlaylistItems</code></td><td>Returns a collection of playlist items matching the API request parameters.</td></tr><tr><td>List Playlists</td><td><code>listPlaylists</code></td><td>Returns a collection of playlists matching the API request parameters.</td></tr><tr><td>List Subscriptions</td><td><code>listSubscriptions</code></td><td>Returns subscription resources matching the API request criteria.</td></tr><tr><td>List Third-Party Links</td><td><code>listThirdPartyLinks</code></td><td>Lists the third-party account links of the authenticated YouTube channel (YouTube Data API thirdPartyLinks.list), such as links between the channel and a merchandise store (channelToStoreLink) or a partner affiliate program (channelToAffiliateProgramLink). Read-only. Google scope: youtube.third-party-link.creator. Filter by type or by linkingToken. Returns items[] with linkingToken, snippet (type and store/affiliate details) and status.linkStatus; an empty list if the channel has no links.</td></tr><tr><td>List Video Abuse Report Reasons</td><td><code>listVideoAbuseReportReasons</code></td><td>Retrieves a list of reasons that can be used to report abusive videos.</td></tr><tr><td>List Video Categories</td><td><code>listVideoCategories</code></td><td>Returns a list of categories that can be associated with YouTube videos.</td></tr><tr><td>List Videos</td><td><code>listVideos</code></td><td>Returns a list of videos matching the API request parameters. Supports listing by id, chart (mostPopular), or myRating. There is no upstream 'mine' filter on this endpoint (removed - always caused HTTP 400 'No filter selected'); to list the authenticated user's own uploads, first call List Channels with mine=true to get contentDetails.relatedPlaylists.uploads, then call List Playlist Items on that playlist id.</td></tr><tr><td>Mark Comment as Spam</td><td><code>markCommentAsSpam</code></td><td>Expresses the caller's opinion that one or more comments should be flagged as spam.</td></tr><tr><td>Rate Video</td><td><code>rateVideo</code></td><td>Add a like or dislike rating to a video, or remove a rating from a video.</td></tr><tr><td>Report Video Abuse</td><td><code>reportVideoAbuse</code></td><td>Reports a video for containing abusive content.</td></tr><tr><td>Search</td><td><code>search</code></td><td>Returns a collection of search results matching the query. Can filter by resource type (video, channel, playlist).</td></tr><tr><td>Send Live Chat Message</td><td><code>insertLiveChatMessage</code></td><td>Post a text message to a live chat (liveChatMessages.insert).</td></tr><tr><td>Set Comment Moderation Status</td><td><code>setCommentModerationStatus</code></td><td>Sets the moderation status of one or more comments (published, heldForReview, rejected).</td></tr><tr><td>Set Video Thumbnail</td><td><code>setThumbnail</code></td><td>Upload a custom thumbnail for a video you own (thumbnails.set). Needs a channel verified for custom thumbnails. Replaces the current thumbnail and cannot restore an auto-generated one. Image is sent base64 in a multipart/related body; Fastn currently caps execute bodies at 8 KB, so only small images work today.</td></tr><tr><td>Set Watermark</td><td><code>setWatermark</code></td><td>Set the channel watermark (branding image) shown on its videos (watermarks.set). Image square, at least 150x150. timingType offsetFromStart/offsetFromEnd, offsetMs when it appears, durationMs how long. Image is sent base64 in a multipart/related body; Fastn currently caps execute bodies at 8 KB, so only small images work today.</td></tr><tr><td>Subscribe to Channel</td><td><code>subscribeToChannel</code></td><td>Subscribes the authenticated user to a channel.</td></tr><tr><td>Transition Live Broadcast</td><td><code>transitionLiveBroadcast</code></td><td>Change a broadcast status to testing, live or complete (liveBroadcasts.transition). The bound stream must be active.</td></tr><tr><td>Unset Watermark</td><td><code>unsetWatermark</code></td><td>Remove the channel's watermark image (watermarks.unset).</td></tr><tr><td>Update Caption</td><td><code>updateCaption</code></td><td>Replace the text of an existing caption track and set its draft flag (captions.update, multipart). Returns the updated caption resource.</td></tr><tr><td>Update Channel</td><td><code>updateChannel</code></td><td>Update the channel's branding (channels.update, part=brandingSettings). WARNING: YouTube replaces the whole brandingSettings.channel object, so read the current values with List Channels (part=brandingSettings) and send every field you want to keep. Returns the updated channel.</td></tr><tr><td>Update Comment</td><td><code>updateComment</code></td><td>Modifies a comment.</td></tr><tr><td>Update Comment Thread</td><td><code>updateCommentThread</code></td><td>Updates the text of a top-level comment via comments.update.</td></tr><tr><td>Update Playlist</td><td><code>updatePlaylist</code></td><td>Modifies a playlist's metadata.</td></tr><tr><td>Update Playlist Item</td><td><code>updatePlaylistItem</code></td><td>Modifies a playlist item (e.g. changes its position in a playlist).</td></tr><tr><td>Update Third-Party Link</td><td><code>updateThirdPartyLink</code></td><td>Updates an existing third-party link of the authenticated YouTube channel (YouTube Data API thirdPartyLinks.update), identified by its linkingToken; send the full snippet you want stored (e.g. a new store name/URL or affiliate programStatus). Google scope: youtube.third-party-link.creator. Intended for approved YouTube Shopping/affiliate partners. Returns the updated link.</td></tr><tr><td>Update Video</td><td><code>updateVideo</code></td><td>Updates a video's metadata. The part parameter identifies the properties that the write operation will set.</td></tr><tr><td>Upload Caption</td><td><code>insertCaption</code></td><td>Upload a caption track (SRT, WebVTT or SBV text) to a video you own (captions.insert, multipart). Text-only, so it works under the 8 KB execute limit for short tracks. Returns the caption resource with its id.</td></tr><tr><td>Upload Channel Banner</td><td><code>insertChannelBanner</code></td><td>Upload a channel banner image (channelBanners.insert, min 2048x1152, 16:9). Returns a url; apply it with Update Channel brandingSettings.image.bannerExternalUrl. Uploading alone does not change the channel. Image is sent base64 in a multipart/related body; Fastn currently caps execute bodies at 8 KB, so only small images work today.</td></tr><tr><td>Upload Video</td><td><code>uploadVideo</code></td><td>Uploads a video file to the authenticated user's YouTube channel with a title, description, category and privacy status. The video bytes are passed as a base64 string, so this action suits short clips; very large files exceed the action payload limit.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/social-media/you-tube.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
