# YouTube Reporting setup for PopMCP

You paste the OAuth Client ID and Client Secret of a Web application client created in your own Google Cloud project. That project needs the YouTube Analytics API, YouTube Reporting API and YouTube Data API v3 enabled, and the consent screen published.

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

## Approval required before this works

Google must verify your OAuth consent screen for the sensitive YouTube reporting scopes (yt-analytics.readonly and, for revenue reports, yt-analytics-monetary.readonly) before the app can be used by anyone outside your own test-user list; system-managed revenue reports additionally require YouTube Partner Program content-owner status.

- Typical wait: Google states 3-5 business days for sensitive-scope verification; 2-6 weeks is commonly reported when the review team asks follow-up questions.
- Cost: Free.
- Blocked until approved: Distribution, not access. Unverified apps sit in Testing status with a 100 hand-listed test-user cap and refresh tokens that expire after 7 days, which breaks any unattended nightly report download. Publishing unverified keeps the warning interstitial and the user cap. Separately, the system-managed ad-revenue and YouTube Premium revenue reports are only generated for content owners in the YouTube Partner Program, and no API approval unlocks them for an ordinary channel.
- Works meanwhile: Channel-level bulk reporting works immediately. Enable the YouTube Reporting API, create an OAuth client, add yourself as a test user, create a reporting job, and the first daily report becomes downloadable within about 48 hours. Backfill of up to 30 days of historical data is issued automatically once the job exists.

## 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, with the Owner or Editor role
- Billing is not required, but the project must allow enabling APIs
- The OAuth app must be published under Audience. Apps left in Testing get refresh tokens that Google expires after 7 days

## Get your credentials

### 1. Pick or create the Google Cloud project

Open the Google Cloud Console and choose a project from the project chip in the top bar, or click New project. Keep every step below inside that one project.

Screen: https://console.cloud.google.com/projectcreate

### 2. Enable all three YouTube APIs

Open APIs & Services and click Library. Search for YouTube Analytics API and click Enable, then repeat for YouTube Reporting API and YouTube Data API v3.

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

### 3. Set the consent screen branding

Open Google Auth Platform and click Branding. Enter an App name and a User support email, then click Save.

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

### 4. Publish the app

Click Audience in the left nav. If Publishing status reads Testing, click Publish app and confirm.

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

### 5. Create a Web application OAuth client

Click Clients, then Create client. Set Application type to Web application, name it PopMCP, paste the callback URL from the PopMCP connect form into Authorized redirect URIs, and click Create.

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

### 6. Copy the Client ID and secret into PopMCP

Copy Client ID and Client secret from the OAuth client created dialog into PopMCP's OAuth Client ID and OAuth Client Secret fields. If the dialog is already closed, open the client and click Add secret.

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

## 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 under Authorized redirect URIs. In the same project, enable all three APIs under APIs & Services → Library: YouTube Analytics API, YouTube Reporting API, and YouTube Data API v3. If any is missing, that part of the connector returns "has not been used in project" errors.
- OAuth Client Secret (clientSecret) [required]: Shown once, in the popup right after you create the client. Google hashes it and 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/yt-analytics-monetary.readonly
- https://www.googleapis.com/auth/youtube.readonly

## Verify

PopMCP sends you through the Google consent screen, you pick the Google account that manages the channel, and the connector shows Connected with your channel name. Asking for a list of reporting jobs returns data instead of a 403.

## Troubleshooting

### "YouTube Reporting API has not been used in project ... before or it is disabled"

Cause: Only some of the three APIs are enabled, or they were enabled in a different project than the one the OAuth client belongs to.

Fix: Open APIs & Services, then Enabled APIs & services, in the same project and confirm YouTube Analytics API, YouTube Reporting API and YouTube Data API v3 are all listed.

### The connection works for a week then breaks with invalid_grant

Cause: The OAuth app was left in Testing. Google expires refresh tokens issued by Testing apps after exactly 7 days.

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

### redirect_uri_mismatch on the consent screen

Cause: The callback URL on the OAuth client does not exactly match the one PopMCP shows.

Fix: Copy the callback URL from the PopMCP connect form character for character into Authorized redirect URIs. No trailing slash, https only.

### 403 insufficientPermissions after connecting

Cause: You authorised with a Google account that is not an owner or manager of the channel.

Fix: Disconnect, reconnect, and choose the Google account that owns the channel or the Brand Account.

### Reports are empty for today

Cause: Reporting API reports are generated once a day, and a new job's first report appears about two days later.

Fix: Wait for the next daily generation, or use the YouTube Analytics connector for on-demand queries.

---

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