# YouTube Data setup for PopMCP

You end up pasting a Google OAuth Client ID and its matching Client Secret, taken from a Web application client created in a Google Cloud project that has YouTube Data API v3 enabled.

- Auth: OAuth authorization
- Setup time: 12 min
- API base URL: https://www.googleapis.com/youtube/v3
- Credentials screen: https://console.cloud.google.com/auth/clients
- Provider docs: https://developers.google.com/youtube/v3/getting-started

## Approval required before this works

Google must verify your OAuth consent screen for the sensitive YouTube scopes before the app can be published beyond test users, and YouTube's API Services team must pass a compliance audit before any quota above the default 10,000 units/day is granted.

- Typical wait: OAuth sensitive-scope verification: Google states 3-5 business days, though developers commonly report 2-6 weeks when a demo video or privacy policy is queried. Quota audit: no published timeline; YouTube says only that a team member will contact you, and reports range from several weeks to months.
- Cost: Free. YouTube scopes are sensitive, not restricted, so no third-party security assessment is involved.
- Blocked until approved: Until verification, the app stays in Testing publishing status: a maximum of 100 test users you list by hand, and refresh tokens are invalidated after 7 days so a long-lived connector stops refreshing and forces re-consent every week. Moving to production without verification still shows every user the 'Google hasn't verified this app' warning screen and keeps the 100-user cap. Separately, until the compliance audit passes you are held to the default quota: 10,000 units/day total, only 100 search.list calls and 100 videos.insert calls per day.
- Works meanwhile: Everything functional works immediately. Create a Google Cloud project, enable YouTube Data API v3, create an OAuth client, add yourself as a test user, and you can read and write live channel data the same day within the default quota. For a single operator connecting their own channel, verification is never strictly required if the app is left in production status and the warning screen is tolerated.

## Before you begin

- A Google account that owns or manages the YouTube channel you want to connect
- A Google Cloud project you can edit. Creating one is free and takes a few seconds
- Permission to publish the OAuth app in Google Auth Platform, under Audience
- The PopMCP callback URL copied to your clipboard, because Google matches redirect URIs character for character

## Get your credentials

### 1. Enable YouTube Data API v3 on your project

Select the project you want to use in the top bar project picker, then open APIs & Services → Library and search for YouTube Data API v3. Click Enable.

Screen: https://console.cloud.google.com/apis/library/youtube.googleapis.com

### 2. Set up the OAuth app branding

Open Google Auth Platform → Branding. If the project has never been configured, click Get started, fill in App name, User support email and Developer contact email, choose External for the audience, and click Create.

Screen: https://console.cloud.google.com/auth/branding

### 3. Create a Web application OAuth client

Go to Google Auth Platform → Clients and click Create client. Set Application type to Web application, click Add URI under Authorized redirect URIs, paste the callback URL from the PopMCP connect screen, then click Create.

Screen: https://console.cloud.google.com/auth/clients

### 4. Copy the Client ID and Client secret

Copy the Client ID and Client secret from the OAuth client created dialog into PopMCP. If you already closed the dialog, open the client from the Clients list and click Add secret.

### 5. Publish the app so the connection does not expire

Open Google Auth Platform → Audience. If Publishing status reads Testing, click Publish app and confirm.

Screen: https://console.cloud.google.com/auth/audience

## Fields PopMCP asks for

- OAuth Client ID (clientId) [required]: Google Cloud Console → Google Auth Platform → Clients → Create client → Web application, with the callback URL above pasted into Authorized redirect URIs (copy it, don't retype; Google matches it exactly, including the trailing slash). Enable the YouTube Data API v3 on the same project first (APIs & Services → Library → YouTube Data API v3 → Enable), or every call fails with "accessNotConfigured".
- OAuth Client Secret (clientSecret) [required]: Shown once, in the popup right after you create the client. Google never shows it again. If you closed that popup, open the client and add a new secret. Stored encrypted here, used server-side only. IMPORTANT: in Google Auth Platform → Audience, if the status says "Testing", click "Publish app" first. Testing-mode apps get a refresh token that Google expires after exactly 7 days, so the connection would work for a week and then stop. Publishing does not require Google's review. It only adds a one-time "Google hasn't verified this app" screen, where you click Advanced and continue.

## Callback URL to register

https://app.popmcp.com/api/providers/google/callback

## Scopes requested

- https://www.googleapis.com/auth/youtube.force-ssl

## Verify

After you paste both values, PopMCP sends you to Google's consent screen for the account that owns the channel. Approve it and the connector card flips to Connected with the channel name shown, and a test call listing your uploads returns rows.

## Troubleshooting

### Error 400: redirect_uri_mismatch

Cause: The Authorized redirect URI on the Google client does not match PopMCP's callback URL byte for byte.

Fix: Re-copy the callback URL from the PopMCP connect screen and paste it into the client's Authorized redirect URIs. Watch for a missing or extra trailing slash, http instead of https, and stray whitespace.

### accessNotConfigured, or "YouTube Data API v3 has not been used in project ..."

Cause: The API was enabled on a different Google Cloud project than the one that owns the OAuth client.

Fix: Check the project name in the console top bar, enable YouTube Data API v3 on that exact project, then retry after a minute.

### Connection works for a week, then returns invalid_grant

Cause: The OAuth app was left in Testing status. Google expires authorizations by a test user seven days after consent.

Fix: Go to Google Auth Platform → Audience and click Publish app, then reconnect the connector in PopMCP to mint a fresh refresh token. Publishing needs no Google review for this scope. It only adds a one-time "Google hasn't verified this app" screen where you click Advanced and continue.

### quotaExceeded after a burst of searches

Cause: The project's default 10,000 units per day quota was consumed. A single search.list call costs 100 units.

Fix: Wait for the midnight Pacific reset, spread searches out, or request more quota from IAM & Admin → Quotas & System Limits.

### You closed the creation dialog without copying the secret

Cause: Google never redisplays a client secret in full.

Fix: Open the client from Google Auth Platform → Clients, click Add secret, copy the new value, then disable the old secret.

---

Source: https://www.docs.popmcp.com/docs/integrations/youtube/