At a glance
Capabilities
An unsupported call returns501 resource.not_supported.
The cross-platform matrix is on Platforms.
Connect an account
Connect withPOST /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.
- One account per channel. Each connected
youtubeaccount 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 inaccount_ids. Withoutbrand_id, each channel connects into its own new brand. With abrand_id, the brand takes one channel and each further channel ends witherror=account.already_linked: see Reconnect an account. - A login with no channel. A Google login that has no YouTube channel ends with
status=erroranderror=platform.youtube.no_channelson yourredirect_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:
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. Everypost.* 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 returns403 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.
Related
- YouTube publishing: fields, scheduling, and quirks for publishing videos
- YouTube comments: list, reply to, moderate, edit, and delete video comments
- Comments: the cross-platform comment endpoints
- Connect accounts: the shared connect flow
- Webhook events: the post and account events
- Platforms: the capability matrix
- Errors: every error code