Growth

YouTube

Connect your YouTube channel to CognitionDesk so you, or an assistant working on your orders, can upload videos, edit their details and read how they are doing — without opening YouTube Studio for every change.

Availability: in review

YouTube is not open to all customers yet. Google has to verify the CognitionDesk app and approve its use of the YouTube API first. Until then, only channels we have added as test users can connect, and videos uploaded through the API stay private. This page describes how it works today; it will be updated when YouTube opens.

Connect your channel

Connecting is a consent screen from Google, not a password you hand over. Someone has to open the link with the Google account that owns the channel and accept.

  1. Create an API key with the social:write permission (see API Keys). social is a sensitive permission and is never in the default set.
  2. Ask for the connection link:
JSON
POST /platform-api/social/connections/youtube/oauth/start
Authorization: Bearer <api-key with social:write>

// → { "success": true, "data": { "network": "youtube", "url": "https://accounts.google.com/..." } }
  1. Open the link with the channel owner's Google account and accept.
  2. Check it with GET /platform-api/social/connections. The account must have a YouTube channel; if it does not, the connection is refused.
JSON
GET /platform-api/social/connections
Authorization: Bearer <api-key with social:read>

From an MCP client you can do the same with the connect_youtube_channel and list_social_connections tools (see MCP).

What permission it asks for

CognitionDesk asks Google for one permission: https://www.googleapis.com/auth/youtube (“manage your YouTube account”). It is the narrowest one that covers everything below: youtube.upload alone can upload but cannot edit a video afterwards, for example to fix a title or change its privacy.

What the agent can do

  • List the latest videos of the channel with views, likes and comments.
  • Upload a video. Privacy is private unless the request says otherwise.
  • Edit title, description, tags, category and privacy of a video.
  • Set a thumbnail (JPG or PNG, up to 2 MB).

Upload

The platform opens the upload session and returns an address; the video file goes from the caller straight to Google and does not pass through CognitionDesk.

JSON
POST /platform-api/social/youtube/<connectionId>/uploads
Authorization: Bearer <api-key with social:publish>

{
  "title": "Product walkthrough",
  "description": "What's new this month",
  "privacyStatus": "private"
}

// → 201 { "data": { "uploadUrl": "https://www.googleapis.com/upload/...", "privacyStatus": "private" } }
// Then PUT the video file to uploadUrl. The URI works for one video and expires in a week.

Edit

JSON
PATCH /platform-api/social/youtube/<connectionId>/videos/<videoId>
Authorization: Bearer <api-key with social:publish>

{ "title": "Corrected title", "privacyStatus": "unlisted" }

What it does not do

  • It does not publish on its own. Nothing is uploaded or changed unless you or an assistant you instructed asks for it with an API key that has social:publish.
  • It does not make anything public by default. A video is private until a request sets its privacy to unlisted or public.
  • It does not delete videos. There is no delete operation; remove a video in YouTube Studio.
  • It does not touch other channels. Every call checks that the connection belongs to the owner of the API key.
  • It does not use your channel data for anything else. We keep the connection (channel name and id, and an encrypted access token) only to operate the channel as you ask.

API quota

YouTube limits the API per Google project, and that project is shared by every CognitionDesk customer. Uploads have their own bucket of 100 per day for the whole platform. If a request fails because the quota is exhausted, retry later; if you expect to upload a lot, tell us so we can ask Google for more.

Disconnect

Disconnecting revokes the permission at Google and then deletes the connection. If Google does not confirm the revocation, the connection is not deleted and the call returns an error, so you never end up thinking you are disconnected when you are not.

JSON
DELETE /platform-api/social/connections/<connectionId>
Authorization: Bearer <api-key with social:write>

You can also revoke access yourself at any time at security.google.com/settings/security/permissions. If Google revokes it, the connection is marked as revoked and deleted within 7 days.

CognitionDesk uses YouTube API Services. By connecting a channel you also agree to the YouTube Terms of Service; Google's Privacy Policy applies to what Google holds.