# YouTube

### Setting up YouTube for Cozmos

In your Cozmos Space go to: <mark style="color:yellow;">Settings / Social Media Integrations / YouTube</mark>

{% hint style="warning" %}
Please note that some channels and content may be restricted due to copyright and privacy terms. So ensure content works as expected before publishing your sphere.&#x20;
{% endhint %}

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FWgvOI3YLA6Rj5BXRyP4C%2FScreenshot%202024-04-18%20at%2017.06.37.png?alt=media&#x26;token=4fb1b66a-e535-4b14-b7ce-d0046db8f5c9" alt="Youtube"><figcaption></figcaption></figure>

{% hint style="info" %}
The 'Title' field allows you to name the content you are linking, this makes it easier to find when browsing what content to add in Curator through the Social Content Link Action
{% endhint %}

For YouTube we support several types of content. Channels, playlists, videos, shorts and livestreams and all use the same approach. You also need to only include part of the url, not all of it. You can see examples of what is required below:

<table><thead><tr><th width="160">Content Type</th><th width="588">Full example URL (yellow section required by Cozmos)</th></tr></thead><tbody><tr><td>Channel</td><td><mark style="color:yellow;">Requires channel ID, explained below</mark></td></tr><tr><td>Video</td><td>https://www.youtube.com/watch?v=<mark style="color:yellow;">3MwMII8n1qM</mark></td></tr><tr><td>Clip/Shorts</td><td>https://www.youtube.com/shorts/<mark style="color:yellow;">hIhgaSwVwh8</mark></td></tr><tr><td>Livestream</td><td>https://www.youtube.com/watch?v=<mark style="color:yellow;">cdZZpaB2kDM</mark></td></tr><tr><td>Playlist</td><td>https://www.youtube.com/playlist?list=<mark style="color:yellow;">PLOGi5-fAu8bFCa0SrS331gW0ykmM7HuAV</mark></td></tr></tbody></table>

{% hint style="info" %}
To access a livestream url link before the video has launched, [we recommend watching this tutoria](https://www.youtube.com/watch?v=XNhJRHBFApc)l to see where the permalink can be found within your own YouTube channel account.
{% endhint %}

***

To add a Channel, you will need the <mark style="color:yellow;">channel id</mark> and how you find this ID will change depending if you are the owner of the channel or not.

For your own channel, click on your profile logo in the top right of the screen and select <mark style="color:yellow;">View your channel</mark>

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FT2SPP4jpdG7xrdiBbsSH%2Fyoutube-channel-id-1.png?alt=media&#x26;token=a2a6278c-f497-4308-a427-49d354d3f88c" alt=""><figcaption></figcaption></figure>

A new browser tab will open, copy the url displayed in that tab. That is your channel ID. Or you click the <mark style="color:yellow;">More About This Channel</mark> button to get your channel name

For public channels, click on the arrow to the right of the channel description

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FwJrHvGKW7UHR9ghep0Ub%2Fpublic-youtube-channel-id-1.png?alt=media&#x26;token=e52ecd38-9242-49ad-80e6-c1e7371944cf" alt=""><figcaption></figcaption></figure>

This will open the About information for this channel. If you scroll to the bottom of the window you will see a <mark style="color:yellow;">Share Channel</mark> button. From here you can get the channel ID

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2F83vsNEQmchHgONKyNGE1%2Fimage.png?alt=media&#x26;token=302f6844-93c1-48f6-af3a-41f0b18ce7a4" alt=""><figcaption></figcaption></figure>

Paste the channel ID in the <mark style="color:yellow;">Add Content</mark> section of the Social Media Integration settings

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FgR2KVIUptsykyuKDuxIv%2Fimage.png?alt=media&#x26;token=6449d8a2-0105-44b2-a712-e6bedee53c50" alt=""><figcaption></figcaption></figure>

For videos, clips, livestreams and playlists follow the same process of Adding Content. Remembering to only use the part of the content URL as described in the table above.

There is no limit to how many content links you can add, but we recommend naming them clearly so you can easily find them in Curator when applying the Social Content Link action.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.cozmos.com/guides/social-media/youtube.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
