YouTube
This page is for operators configuring YouTube and users connecting a channel.
YouTube supports Shorts and long-form video uploads. It uses Google OAuth, asks the user to choose a channel, and stores the Google refresh token for scheduled uploads.
Requirements
- Google Cloud OAuth app with the YouTube Data API v3 enabled
- OAuth redirect URL:
https://your-domain.com/api/v1/accounts/youtube/callback- OAuth scopes:
https://www.googleapis.com/auth/userinfo.profilehttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/youtube.readonlyhttps://www.googleapis.com/auth/youtube.uploadhttps://www.googleapis.com/auth/youtube
- One video attachment on the OpenPost post or YouTube-specific variant
Configuration
Configure YouTube through the provider app registry. For bootstrap/self-hosting, use OPENPOST_PROVIDER_APPS:
[
{
"provider": "youtube",
"client_id": "your-google-oauth-client-id",
"client_secret": "your-google-oauth-client-secret"
}
]If redirect_uri is omitted, OpenPost derives it from OPENPOST_APP_URL.
Current Scope
- Connects a selected YouTube channel.
- Uploads one video through the YouTube Data API
videos.insertendpoint with resumable-upload handling. - Uploads videos as private by default, with YouTube-specific privacy settings available through publication/variant settings.
- Supports title, description, tags, category, made-for-kids, thumbnail, and playlist settings when provided. A thumbnail can be uploaded or captured from the attached video in destination settings.
- Uses the post or account version for a fallback title and description when those fields are empty.
- Supports scheduling and platform variants through the normal OpenPost post flow.
- Lists comments, sends replies, moderates comments, and deletes comments from the connected channel when Comments and replies is enabled for that channel and Google grants access. Comments and replies is an optional per-account feature that starts off.
- YouTube does not support Direct messages in OpenPost, and Grow is not available for YouTube.
Current Limits
- Comment and moderation actions require YouTube permissions and can vary by channel or comment.
- Test a live account before you rely on YouTube publishing, especially for app review, playlists, and thumbnails.
Analytics
Analytics is an optional feature per connected YouTube channel. It starts off for a new account. Enable it after connection or in Account details. OpenPost collects channel subscribers, video count, and channel views plus published-video views, likes, and comments when enabled. Google may omit hidden subscriber counts. Accounts without youtube.readonly may need to reconnect. Disabling Analytics stops future YouTube analytics collection without deleting stored metrics or revoking authorization.
Direct messages, Comments and replies, and Analytics are optional and per connected account. Disabling a feature stops future provider reads and writes without deleting history or revoking provider authorization. Availability depends on provider support, required scopes, and plan access as distinct facts.
Troubleshooting
google account has no YouTube channelsusually means the authenticated Google user has no YouTube channel available to the OAuth app.invalidTitleusually means the first line of the post or variant is empty or invalid after trimming.mediaBodyRequiredusually means the video file could not be read from OpenPost media storage.- Upload permission errors usually mean the Google Cloud project lacks YouTube Data API v3 access or the OAuth app has not been verified for the requested scopes.