Integrations

YouTube Analytics

Connect YouTube Analytics to see how your channel and videos perform, where viewers come from, who is watching, and which videos win subscribers.

OAuth authorizationApproval, Google states 3-5 business days…Ads & SocialYouTube Analytics API docs

You paste the Client ID and Client secret of a Web application OAuth client from your own Google Cloud project, with the YouTube Analytics API and YouTube Data API v3 enabled and the app published.

OAuth scope verification before this connector works

Google must verify your OAuth consent screen for the sensitive YouTube scopes (youtube.readonly plus yt-analytics.readonly, and yt-analytics-monetary.readonly for revenue data) before the app can serve users outside your own test-user list.

Typical wait
Google states 3-5 business days for sensitive-scope verification; developers commonly report 2-6 weeks when the demo video, scope justification or privacy policy is queried.
Cost
Free. These are sensitive scopes, not restricted ones, so no third-party security assessment fee applies.
Blocked until approved
Nothing about reading your own analytics. What is blocked is distribution: in Testing publishing status you are capped at 100 hand-listed test users and refresh tokens are invalidated after 7 days, so a persistent connector stops working roughly weekly. Publishing to production unverified still shows every user the 'Google hasn't verified this app' interstitial and keeps the 100-user cap.
Works meanwhile
Everything. Enable the YouTube Analytics API in a Google Cloud project, create an OAuth client, add yourself as a test user, and reports.query returns live view, watch-time and revenue data for your own channel the same day.

Where to apply: Google Cloud Console > Google Auth Platform (formerly APIs & Services > OAuth consent screen) > Branding and Data Access > Publish app > Prepare for verification. Requires a Search Console-verified domain, a privacy policy on that domain, per-scope justification and a screen recording of the consent flow.

  • reports.query now requires youtube.readonly in addition to yt-analytics.readonly. Apps that only asked for the analytics scope started failing when that requirement landed, and the extra scope has to be justified in the verification submission too.
  • yt-analytics-monetary.readonly draws extra scrutiny in review because it exposes estimated revenue. Do not request it unless the demo video shows revenue being used.
  • The 7-day refresh token expiry in Testing status is silent. The connection succeeds, then dies with invalid_grant a week later.
  • Content owner reports are only accessible to YouTube Partner Program content partners. No amount of OAuth verification substitutes for partner status.
  • Analytics data is not real time; expect a 2-3 day lag on many metrics, which is a data limitation rather than an approval one but is often mistaken for a permissions failure.
Setup time
10 min
Auth
OAuth authorization
API base URL
https://youtubeanalytics.googleapis.com/v2
Rate limits
Quota is per Cloud project. The YouTube Data API v3 gives 10,000 units per day by default, and the YouTube Analytics API has its own per-project query quota on the console Quotas page.

Before you begin

  • A Google account that owns or manages the YouTube channel you want to report on
  • A Google Cloud project you can edit. Creating one is free and takes a minute
  • Permission to publish the OAuth app under Google Auth Platform, Audience. An app left in Testing gets a refresh token Google expires after 7 days
  • Only for revenue metrics: the channel must be in the YouTube Partner Program and you must sign in as an owner

Get your credentials

Create the project and enable both YouTube APIs

Use the project picker in the top bar to create a project named PopMCP YouTube. Inside it go to APIs & Services, then Library, and enable both YouTube Analytics API and YouTube Data API v3.

Open this screen →

Fill in Branding and set the audience

Open Google Auth Platform, then Branding, and enter the app name, user support email and developer contact email. Open Audience and set User type to External.

Open this screen →

Add the three YouTube scopes

Go to Data access and click Add or remove scopes. Paste each YouTube scope into the manual-entry box, click Add to table, then Update and Save.

Open this screen →

console.cloud.google.com/auth/scopes
Search (/) for resources, docs, products, and morepopmcp-youtube
Google Auth Platform / Data access

Data access

Scopes define the data your app can request from a user's Google Account.

Non-sensitive scopesSensitive scopesRestricted scopes
Add or remove scopes
ScopeUser-facing descriptionType
.../auth/yt-analytics.readonlyYouTube Analytics APIView YouTube Analytics reports for your YouTube contentSensitive
.../auth/yt-analytics-monetary.readonlyYouTube Analytics APIView monetary reports for your YouTube contentSensitive
.../auth/youtube.readonlyYouTube Data API v3View your YouTube accountSensitive

Drop the monetary scope if the channel is not monetised.

Publish the app

Open Audience, find Publishing status: Testing and click Publish app, then click Confirm.

Open this screen →

console.cloud.google.com/auth/audience
Search (/) for resources, docs, products, and morepopmcp-youtube
Google Auth Platform / Audience

Audience

Control who can access your app while it is in testing or production.

While publishing status is Testing, refresh tokens expire after 7 days.
Publishing
User type
External
Publishing status
Testing
Verification status
Not submitted
Publish appGo to Verification center

After confirming, Publishing status reads In production.

Create the Web application OAuth client

Open Clients and click Create client. Set Application type to Web application, name it PopMCP, click Add URI under Authorized redirect URIs and paste the callback URL from the PopMCP connect screen, then click Create.

Open this screen →

console.cloud.google.com/auth/clients
Search (/) for resources, docs, products, and morepopmcp-youtube
Google Auth Platform / Clients

Create OAuth client ID

A client ID identifies a single app to Google's OAuth servers.

Create OAuth client ID
Application type
Web application
Name
PopMCP
Authorized redirect URIs
https://app.popmcp.com/oauth/callback/youtube-analytics
Add URICreate

The redirect URI must match the one PopMCP shows character for character.

Copy the client ID and secret into PopMCP

Copy Client ID and Client secret from the confirmation dialog into PopMCP, click connect, and approve the consent screen with the account that manages the channel.

Open this screen →

console.cloud.google.com/auth/clients
Search (/) for resources, docs, products, and morepopmcp-youtube
Google Auth Platform / Clients

OAuth client created

The client secret is shown in full only once.
OAuth client created
Client ID
8140****-a1b2c3.apps.googleusercontent.com
Client secret
GOCSPX-****************9f2k
Download JSONOK

Connect in PopMCP

Open your workspace, choose YouTube Analytics in the marketplace, and fill in the connect dialog:

FieldWhat to enter
OAuth Client IDtextFrom your Google Cloud project → APIs & Services → Credentials → OAuth client (type: Web application). Enable BOTH the YouTube Analytics API and the YouTube Data API v3 on that same project first: reports come from the first, and the channel picker from the second.
OAuth Client SecretsecretStored encrypted; used server-side only and never shown again. Before connecting, publish your OAuth app (Google Auth Platform → Audience → Publish app). An app left in Testing gets a refresh token Google expires after 7 days, so the connection would silently die a week from now. Publishing needs no Google review.Encrypted with AES-256-GCM on save and never shown again.
Callback URL
https://app.popmcp.com/api/providers/google/callback

PopMCP verifies the credential against YouTube Analytics immediately. On success the connection flips to Verified and its MCP tools are provisioned.

Permissions PopMCP requests

These are the scopes sent to YouTube Analytics at authorization time.

ScopeWhy PopMCP asks for it
https://www.googleapis.com/auth/yt-analytics.readonlyThe core read scope for view counts, watch time, traffic sources, demographics and subscriber gains.
https://www.googleapis.com/auth/yt-analytics-monetary.readonlyAdds estimated revenue and ad performance metrics. Only returns data for channels in the YouTube Partner Program.
https://www.googleapis.com/auth/youtube.readonlyRequired by reports.query and used to list your channels and video titles so reports read as names rather than raw IDs. Served by the YouTube Data API v3, which is why that API must also be enabled.

Verify it worked

PopMCP marks YouTube Analytics as Connected and names the channel you approved. Asking for views and watch time over the last 28 days returns numbers that match the Analytics tab in YouTube Studio.

Troubleshooting

Error 400: redirect_uri_mismatch

Why: The Authorized redirect URI on the OAuth client is not byte-identical to the callback PopMCP sends.

Fix: Copy the callback URL straight from the PopMCP connect screen into Google Auth Platform, Clients, your client, Authorized redirect URIs. Save and wait a minute before retrying.

The connection works for a week and then fails with invalid_grant

Why: The OAuth app is still in Testing, so Google expired the refresh token after 7 days.

Fix: Go to Google Auth Platform, Audience, click Publish app so the status reads In production, then reconnect in PopMCP to mint a fresh token.

403 accessNotConfigured, or 'YouTube Analytics API has not been used in project ...'

Why: Only one of the two APIs was enabled, or the OAuth client lives in a different project from the enabled APIs.

Fix: Confirm both YouTube Analytics API and YouTube Data API v3 appear under APIs & Services, Enabled APIs & services for the project that owns the OAuth client.

Revenue metrics come back empty or 403 while view metrics work

Why: The channel is not monetised, or the Google account that approved consent is a manager rather than an owner.

Fix: Re-approve with the channel owner account. If the channel is not in the YouTube Partner Program, drop the monetary scope and use the non-revenue reports.

'Access blocked: this app has not completed the Google verification process'

Why: The app is External and still in Testing, and the signing-in account is not on the test users list.

Fix: Publish the app under Google Auth Platform, Audience instead of managing test users. The app stays unverified, so click Advanced and then 'Go to PopMCP (unsafe)' to continue with your own account.

You want to hand the connector to a wider team

Why: These YouTube scopes are classed as sensitive, so an unverified published app is capped at 100 consenting accounts.

Fix: Submit the app from Google Auth Platform, Verification center. Verification is not needed for your own channel.

Reference

On this page