Skip to main content
The YouTube API in SocialAPI connects a YouTube channel. It uploads, schedules, edits, and deletes videos, reads and moderates comments, posts replies and top-level comments, and reads channel stats. SocialAPI’s own Google app connects the channel, so you register nothing: see Platform apps.

At a glance

Capabilities

An unsupported call returns 501 resource.not_supported. The cross-platform matrix is on Platforms.

Connect an account

Connect with POST /v1/accounts/connect and "platform": "youtube". The shared flow, request fields, and result are in Connect accounts, and the redirect parameters are in Redirect parameters.
Response (HTTP 202):
YouTube-specific rules:
  • One account per channel. Each connected youtube account is 1 YouTube channel. When the Google login manages more than 1 channel, one authorization connects all of them, and the redirect carries their IDs in account_ids. Without brand_id, each channel connects into its own new brand. With a brand_id, the brand takes one channel and each further channel ends with error=account.already_linked: see Reconnect an account.
  • A login with no channel. A Google login that has no YouTube channel ends with status=error and error=platform.youtube.no_channels on your redirect_uri.
  • Reconnect. When YouTube no longer accepts the saved connection, calls return 401 platform.youtube.auth. See Reconnect an account.

Read videos and channel stats

GET /v1/posts?platform=youtube&account_ids={account_id} lists the channel’s videos with their permalink and engagement metrics: see YouTube publishing. GET /v1/platforms/youtube/accounts/{account_id}/summary returns the channel’s aggregate stats:
Response (HTTP 200):
POST /v1/platforms/youtube/accounts/{account_id}/sync re-reads the channel’s videos at once and returns {"success": true}. Use it after you upload a video outside SocialAPI.

Comments

SocialAPI lists comments and replies on the channel’s videos, replies to comments, posts top-level comments, hides, moderates, edits, and deletes comments, with YouTube’s own filters for comments held for review or likely spam. Endpoints, fields, limits, and errors are in YouTube comments.

Webhook events

YouTube sends nothing to SocialAPI, so it emits no comment events: read comments with the endpoints in YouTube comments. Every post.* event in Webhook events is emitted for videos you publish through SocialAPI. You also receive account.connected when you connect a channel, account.disconnected when SocialAPI flags the channel, and account.updated when the account loses permissions you did not remove yourself. See Webhook events.

Suspended or closed channels

When YouTube suspends or closes the account or its channel, every call on it returns 403 platform.youtube.account_suspended. The saved connection is still valid, so reconnecting changes nothing: the owner resolves the suspension with YouTube. SocialAPI sets the account’s reconnect_reason to youtube_account_suspended, and sends an account.disconnected event with that reason.

Limits

The publishing rules are in YouTube publishing.

Scopes

SocialAPI’s Google app requests this scope at connect. You apply for no Google app review. The consent screen is the same whichever permissions you select. YouTube asks for 1 scope that covers reading and writing, so the consent screen shows it whatever you select. The account is still limited to the permissions you selected: an account connected with comments.read alone cannot reply to comments. A call the granted scope does not permit returns 403 platform.youtube.insufficientPermissions. Reconnect the account to grant it again.
Last modified on November 15, 2026