YouTube Integration

Connect your AI agent to YouTube. Upload videos, manage comments, track channel analytics, organize playlists, and moderate live chats through the YouTube Data API v3.

OAuth2 (YouTube Data API v3)*.googleapis.com, *.youtube.com

What your agent can do

Full YouTube channel management through the Data API v3.

Video upload

Upload videos to your YouTube channel. Set titles, descriptions, tags, thumbnails, and privacy settings. Your agent handles the resumable upload flow.

Comment management

Read and reply to comments on your videos. Auto-respond to common questions, moderate spam, and pin top comments to boost engagement.

Channel analytics

Pull channel and video analytics including views, watch time, subscriber growth, and revenue. Generate performance reports automatically.

Playlist management

Create and organize playlists. Add or remove videos, reorder items, and set playlist descriptions and privacy settings.

Live chat moderation

Monitor and moderate live stream chat in real time. Auto-respond to questions, remove spam messages, and manage chat rules.

Secure API access

Your YouTube credentials are encrypted with AES-256-GCM. OAuth2 tokens are automatically refreshed so your agent stays connected.

Prerequisites

  • A YouTube channel associated with your Google account
  • A Google Cloud project with YouTube Data API v3 enabled
  • OAuth 2.0 Client ID credentials (Desktop app type)
  • A refresh token with youtube and youtube.upload scopes

YouTube Data API has a daily quota of 10,000 units. Video uploads cost 1,600 units each. If your agent uploads frequently, you may need to request a quota increase through Google Cloud.

Step-by-step setup

Connect your YouTube channel to ClawTrust in about 10 minutes.

1

Create a Google Cloud project

Go to console.cloud.google.com and create a new project (or use an existing one). Enable the YouTube Data API v3 from the API library.

2

Create OAuth2 credentials

In your Google Cloud project, go to APIs & Services, then Credentials. Create an OAuth 2.0 Client ID (Desktop app type). Download the client ID and client secret.

3

Generate a refresh token

Use Google's OAuth Playground or a local script to complete the OAuth consent flow. Request the youtube, youtube.upload, and youtube.force-ssl scopes. Save the refresh token.

4

Add credentials in ClawTrust

Open your agent's dashboard, go to Credentials, and click Add Credential. Select "YouTube" and enter your client ID, client secret, and refresh token. ClawTrust encrypts them before storage.

5

Your agent is live on YouTube

Your agent can now upload videos, manage comments, and pull analytics. Test it by asking your agent to show your recent video performance.

Credential details

YouTube uses OAuth2 authentication through the Google Cloud platform.

OAuth2 Client ID

The client ID from your Google Cloud OAuth 2.0 credentials. Used to authenticate your app with Google's OAuth service.

OAuth2 Client Secret

The client secret paired with your client ID. Kept encrypted and never exposed to the tenant VPS.

Refresh Token

A long-lived token that lets ClawTrust automatically generate new access tokens. Does not expire unless you revoke access in your Google account.

Channel ID (optional)

Your YouTube channel ID. Auto-detected from the OAuth token if not provided. Required only if your Google account manages multiple channels.

All credentials are encrypted with AES-256-GCM and stored in ClawTrust's secrets vault. OAuth2 tokens are automatically refreshed so your agent stays connected.

Example actions

Once connected, try asking your agent any of these:

"Upload this video to our channel with the title and description..."

"Reply to unanswered comments on our last 5 videos"

"Show our channel analytics for the past 30 days"

"Create a new playlist called [name] and add these videos"

"Moderate the live chat and remove any spam messages"

Ready to automate your YouTube channel?

Connect your channel in minutes. Secure OAuth2 on every plan.