Skip to content

YouTube

How to configure YouTube channel for OpenQuok — Google Cloud OAuth, APIs, and backend env vars.

10 min read

Connect your agent today

Draft from chat, review in your calendar, and publish only what you approve.

Start for $0

Overview

YouTube publishing uses Google OAuth 2.0 with the YouTube Data API v3 and YouTube Analytics API.

You need a Google Cloud project, an OAuth Web application client, enabled APIs, and backend env vars YOUTUBE_CLIENT_ID and YOUTUBE_CLIENT_SECRET.

OpenQuok uploads one MP4 video, with optional title, privacy, tags, made-for-kids flag, and custom thumbnail. After OAuth you pick which YouTube channel to connect (two-step flow).

CLI walkthroughs: CLI Examples — YouTube.

Features

Supported

FeatureDetails
Video uploadExactly one .mp4 attachment per scheduled post
Title2–100 characters via provider settings
DescriptionPost body (-c / composer), up to 5,000 characters
Privacypublic, private, or unlisted
TagsOptional string labels in provider settings
Custom thumbnailOptional image path after upload
Made for kidsselfDeclaredMadeForKidsyes or no
ShortsVertical MP4 uploads use the same video upload path; YouTube may classify qualifying uploads as Shorts
Channel analyticsTime-series metrics (views, watch time, subscribers, likes, …) for 7 / 30 / 90 days
Per-video snapshotViews, likes, comments, favorites on published videos

Not supported

FeatureNotes
Text-only postsA video attachment is required
Follow-up commentsNo threaded replies after publish
Playlists or categoriesNot wired in OpenQuok today
YouTube-side scheduled publishOpenQuok schedules; upload uses immediate publish with privacy status
Community postsNot available through the public YouTube Data API
Shorts-specific publish modeStandard video upload only — no separate Shorts API or composer toggle

Backend environment

OpenQuok reads YouTube credentials only through backend/config/GlobalConfig.ts. Set:

  • YOUTUBE_CLIENT_ID — OAuth **Client ID** (Web application)
  • YOUTUBE_CLIENT_SECRET — OAuth **Client secret**

Copy from backend/.env.development.example into backend/.env.development.local, fill values, then restart the backend.

The frontend base URL used for OAuth redirects comes from FRONTEND_DOMAIN_URL (default https://localhost:5173 for local Vite).

OAuth redirect URI (register in Google Cloud)

Google redirects the browser to your web app after consent—not to /api/v1.

  • Production (when FRONTEND_DOMAIN_URL is https://…): register
https://YOUR-FRONTEND-DOMAIN/integration/oauth/youtube
  • Local development: typical value when Vite runs on port 5173:
https://localhost:5173/integration/oauth/youtube

After OAuth, OpenQuok shows a channel picker so you choose which YouTube channel to connect.

API access and verification

Google splits this into two layers. They are easy to confuse because both live in Cloud Console.

StepWhat it isWhen you need it
Enable APIsTurn on YouTube Data API v3 and YouTube Analytics API under APIs & Services → LibraryAlways — without this, uploads and analytics calls fail
OAuth consent (Testing)Leave Publishing status on Testing and add test users on the OAuth consent screenDevelopment and internal pilots — no formal Google review; only listed accounts can connect
OAuth verificationSubmit the app in the OAuth Verification Center (scopes, privacy policy, demo video, justifications)Public production — before any Google account outside your test list can connect
Workspace admin trustMark your OAuth client as Trusted in Google AdminSometimes — brand accounts or Workspace orgs that block third-party apps (see below)
Quota increaseRequest a higher YouTube Data API quota in Cloud ConsoleOnly if you hit default daily upload/read limits

Several scopes OpenQuok requests are classified as sensitive by Google (for example youtube.upload and yt-analytics.readonly). That is expected for upload and analytics. While the app stays in Testing, you can use those scopes with test users only — including past Google’s “unverified app” warning screen. To go Production for arbitrary Google users, complete sensitive scope verification (often about a week).

You do not need a separate “request access” for YouTube Reporting API — OpenQuok does not use it.

General setup

Follow Obtaining authorization credentials for the underlying Google requirements. The steps below add OpenQuok redirect URIs, env vars, and the channel-picker flow.

Open Google Cloud Console

Sign in with the Google account that will own the Cloud project, then open Google Cloud Console. Accept the terms if prompted.

Create or select a project

On the project selector, choose New project (or pick an existing project dedicated to YouTube publishing). Give it a clear name and click Create.

Enable YouTube APIs

In APIs & Services → Library, search for and enable:

Enable Google APIs

  • YouTube Data API v3 — uploads, channel listing, video metadata
  • YouTube Analytics API — channel analytics in OpenQuok

Enable Youtube APIs

You do not need YouTube Reporting API for OpenQuok today.

In APIs & Services → OAuth consent screen -> Get Started:

Configure Outh Consent

  • Choose External for a public app that , or internal for business accounts only.

Choose Audience

  • Fill required app information (app name, support email, developer contact).

Fill App Info

Create OAuth Web client credentials

  • Click Create Credentials, then choose OAuth client ID.

  • Choose application type Web application.

  • Under Authorized JavaScript origins, leave empty; OpenQuok uses server-side redirect OAuth, not browser JavaScript calls to Google.

  • Under Authorized redirect URIs, add the following Authorized redirect URIs from the OAuth redirect URIs section to your app’s valid OAuth redirect list.

Oauth Credentials

After creation, copy Client IDYOUTUBE_CLIENT_ID and Client secretYOUTUBE_CLIENT_SECRET into backend/.env.development.local (or your deployment secrets).

Restart the backend so new env vars load.

Connect a Youtube Channel in OpenQuok

In the web app, start Connect YouTube, sign in with Google, grant permissions, then pick the channel you manage on the callback screen.

  • userinfo.profile
  • userinfo.email
  • youtube
  • youtube.force-ssl
  • youtube.readonly
  • youtube.upload
  • yt-analytics.readonly

On the OAuth consent screen, userinfo.profile and userinfo.email appear as non-sensitive Google sign-in scopes. Your verification submission should list the five YouTube scopes above — keep the Cloud Console Data access page in sync with this list before resubmitting.

While the app is in Testing publishing status, only accounts you list as test users can finish OAuth.

Add test users (Testing mode)

In OAuth consent screen, → OAuth consent screen -> Audience -> Click + Add users

Add every Google account that will connect a YouTube channel during development.

Add test users

Brand accounts and Google Workspace

Use this section when the YouTube channel is a Brand account (managed separately from a personal Google login)

or when publishers sign in through Google Workspace and the OAuth screen blocks access until an admin trusts the app.

Sign in to Google Admin

Open Google Admin console with a super-admin or security-admin account for the Workspace that owns the brand channel.

Open API controls

Go to Security → Access and data control → API controls, then Manage third-party app access.

Trust your OAuth client

Click Configure new app, paste your YOUTUBE_CLIENT_ID (OAuth client ID from the credentials step), select the app from the search results, and set App access / data access to Trusted for the scopes your publishers need.

Save the policy.

Wait for propagation

Google Workspace policy changes can take several hours (often around five hours) to apply. If OAuth still fails after trust is saved, wait and retry Connect YouTube with a test-listed account that manages the brand channel.

Reconnect in OpenQuok

After propagation, remove any stale YouTube integration in OpenQuok and run Connect YouTube again. Confirm the brand channel appears in the channel picker.

How OpenQuok uses the flow

  • Authorize URL is produced by the backend; the user signs in with Google and returns to the frontend route with an authorization code.

  • The web client calls the backend social-connect endpoint with code, state, and timezone so the server can exchange the code and list channels.

  • After you pick a channel, OpenQuok stores the channel id as the integration’s internal id and keeps the user OAuth token for refresh (unlike Meta Page tokens).

API prefix defaults to /api/v1 (see API_PREFIX).

Troubleshooting

No channels in the picker

The signed-in Google account must own or manage at least one YouTube channel. Try another account or create a channel in YouTube Studio, then reconnect. For brand accounts, sign in with the Google identity that manages the brand (not only the channel’s public name), and confirm that identity is listed as an OAuth test user while the app is in Testing mode.

OAuth blocked for Workspace or brand accounts

If Google shows an admin-blocked or unauthorized-client error, complete the Brand accounts and Google Workspace steps: trust YOUTUBE_CLIENT_ID in Google Admin, wait for propagation, and reconnect with a test-listed account.

Missing permissions after OAuth

Remove the channel in OpenQuok and reconnect. Ensure the OAuth consent screen includes YouTube upload and analytics scopes and that you clicked Allow for all requested access.

Upload fails at publish time

Confirm the post has exactly one MP4 in media, a title between 2 and 100 characters, and that the backend can resolve stored media to a public https:// URL for Google to fetch.

References

Search documentation
Find a docs page
Discord Support