> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trypost.it/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube

> Connect your YouTube channel to TryPost

# YouTube

TryPost supports uploading YouTube Shorts.

## Connect your account

1. Go to **Accounts** in the TryPost dashboard
2. Click **Connect YouTube**
3. Authorize TryPost with your Google account
4. Select the YouTube channel to connect

## Supported content types

| Type      | Aspect ratio | Description                                |
| --------- | ------------ | ------------------------------------------ |
| **Short** | 9:16         | Vertical video up to 60 seconds (required) |

## OAuth scopes

`https://www.googleapis.com/auth/youtube.upload`, `https://www.googleapis.com/auth/youtube.readonly`, `https://www.googleapis.com/auth/youtube.force-ssl`, `https://www.googleapis.com/auth/yt-analytics.readonly`

`yt-analytics.readonly` powers the **Analytics** dashboard's YouTube view.

## Self-hosting setup

<Accordion title="Configure Google/YouTube API credentials">
  1. Go to [Google Cloud Console](https://console.cloud.google.com/) and create a project
  2. Enable the **YouTube Data API v3** and **YouTube Analytics API**
  3. Create OAuth 2.0 credentials
  4. Add the scopes listed above to the OAuth consent screen
  5. Set the redirect URL to `{APP_URL}/accounts/youtube/callback`
  6. Add to your `.env`:

  ```env theme={null}
  GOOGLE_CLIENT_ID=your_client_id
  GOOGLE_CLIENT_SECRET=your_client_secret
  GOOGLE_CLIENT_REDIRECT="${APP_URL}/accounts/youtube/callback"
  ```

  <Note>
    The same Google credentials are used for YouTube and [Google Login](/self-hosting/configuration#google-login). Add both callback URLs to your OAuth client.
  </Note>
</Accordion>
