Publit.Si
Docs›Connect YouTube

Platforms

Connect YouTube

You create your own Google project; no invitation from Publit.Si is needed. Start in test mode: it works in minutes and needs no domain, and you reconnect every 7 days. With a Cloudflare tunnel you can later switch to production and skip the weekly reconnect.

You need

  • A Google account that owns your YouTube channel (or manages the Brand Account)
  • Nothing else for test mode. For production: a Cloudflare tunnel

Create the project and enable the APIs

  1. Open console.cloud.google.com → project picker at the top → New project. Any name works, for example “Publit.Si”.

  2. APIs & Services → Library → search YouTube Data API v3 → Enable.

    Google Cloud, YouTube Data API v3 product page, already enabled: Manage button and API Enabled
    1. 1:Enable / Manage
    YouTube Data API v3 → Enable. Once it's on, the button says Manage and “API Enabled” appears.
  3. Do the same for YouTube Analytics API if you want watch time. Without it everything else still works.

  4. Have a blog? Enable Google Search Console API too for its search numbers. The blog guide has the rest.

Name your app

  1. Open Google Auth Platform (older menus: APIs & Services → OAuth consent screen). Click Get started if Google asks.

  2. Branding: app name (e.g. “Publit.Si”), your User support email and, under Developer contact information, your email address → Save. A logo is optional.

    Google Auth Platform, Branding: App information with app name and user support email
    1. 1:Branding
    2. 2:App name
    3. 3:User support email
    Branding → App information: app name and your support email. The developer contact is further down.
  3. Audience: user type External.

Add yourself as a test user

This is the step people miss. Without it Google shows “Access blocked” with “Error 403: access_denied”.

  1. Audience → Test users → + Add users.

    Google Auth Platform, Audience: publishing status Testing, user type External, the user cap and Test users with Add users
    1. 1:Testing
    2. 2:External
    3. 3:Add users
    Audience → Test users → + Add users. This is the step that fixes “Access blocked”.
  2. Enter the Google account that owns your YouTube channel. For a Brand Account, the Google account that manages it. → Save.

    Add users panel with a Google account email typed in and the Save button
    1. 1:Your Google account
    2. 2:Save
    Add the Google account that owns your YouTube channel, then Save.

Create the OAuth client

  1. In Publit.Si, open Settings › Platform setup › YouTube and copy the redirect URI, usually http://localhost:3000/api/oauth/youtube/callback.

    Publit.Si Settings, Platform setup: a card per platform with checks, a status badge and the redirect URI to copy
    1. 1:Status of the platform
    2. 2:Redirect URI to copy
    Settings › Platform setup: what's set for each platform and the exact redirect URI to copy.
  2. Google: Clients → Create client → application type Web application. The name is only for you.

    Create OAuth client ID: application type Web application and a name
    1. 1:Clients
    2. 2:Web application
    Clients → Create client → application type Web application. The name is only for you.
  3. Authorized redirect URIs → + Add URI → paste it → Create. Leave Authorized JavaScript origins empty.

    OAuth client for a web application: Authorized JavaScript origins empty, Authorized redirect URIs with the localhost callback
    1. 1:JavaScript origins: leave empty
    2. 2:Authorized redirect URIs
    The callback goes under Authorized redirect URIs, not under JavaScript origins.
  4. Google shows the Client ID and Client secret. Enter both in Publit.Si under Enter credentials, or in .env:

    GOOGLE_CLIENT_ID=…
    GOOGLE_CLIENT_SECRET=…
    Enter credentials form in Publit.Si with the Google client ID filled in and the secret field empty
    1. 1:Client ID
    2. 2:Save and apply
    Enter credentials writes the keys into .env for you and restarts the services. Secrets are never shown again.

Connect your channel

  1. Publit.Si → Accounts → Connect account → YouTube.

    Accounts page with the Connect account menu open, listing Instagram, YouTube and TikTok
    1. 1:Connect account
    2. 2:YouTube
    Accounts › Connect account: pick the platform.
  2. Publit.Si asks where to sign in: pick a Chrome profile or In this window.

  3. Pick the Google account you added as a test user. Google warns “Google hasn't verified this app … currently being tested”: click Continue. It's your own app.

    Google sign-in warning: Google hasn't verified this app, you've been given access to an app that's currently being tested, with Continue and Back to safety
    1. 1:Continue
    In test mode Google says you were given access to an app being tested. It's your own app: click Continue.
  4. Google lists what Publit.Si may do, with three unticked YouTube boxes. Tick Select all → Continue. Without the upload permission Publit.Si can't post and says “Upload permission was not granted”. The note that Publit.Si's privacy policy isn't linked is normal in test mode.

  5. Several channels? Google asks which one. Your own channel is listed under your name, not the channel name.

Needs the tunnel

Optional: no weekly reconnect

Switch the project to production once and the 7-day limit is gone. Google only allows that when Branding has a homepage, privacy policy and terms on your own domain. Your gateway serves all three.

  1. Make sure PUBLITSI_OPERATOR_NAME and PUBLITSI_OPERATOR_EMAIL are set in .env (see Cloudflare tunnel). Open https://publish.example.com/privacy to check.

  2. Publit.Si → Settings › Platform setup › YouTube › Keep YouTube connected lists your exact values.

    Publit.Si, Platform setup, YouTube: Keep YouTube connected, with test mode and the homepage, privacy, terms and domain values for Google's Branding page
    1. 1:Test mode: add yourself as a test user
    2. 2:Production: values for Branding
    Keep YouTube connected: your exact values for Google's Branding page, already filled in from your tunnel address.
  3. Branding → App domain: Application home page https://publish.example.com/, Application privacy policy link https://publish.example.com/privacy, Application terms of service link https://publish.example.com/terms. Authorized domains → + Add domain → example.com (no https://, never localhost) → Save.

    Branding, App domain: empty fields for home page, privacy policy and terms of service, and Authorized domains with Add domain
    1. 1:Home page, privacy, terms
    2. 2:Add domain
    For production only: App domain takes the three links from your gateway, Authorized domains your domain.
  4. If Google asks you to verify the domain, do it in Google Search Console with the same Google account.

  5. Audience → Publish app (greyed out until Branding is complete) → Confirm. Status becomes In production. For your own use (fewer than 100 users) Google needs no review.

    Audience, Publishing status Testing with a greyed-out Publish app button and the note to complete Branding first
    1. 1:Testing
    2. 2:Publish app
    Publish app stays greyed out until Branding is complete. Then click it → In production → reconnect YouTube once.
  6. Publit.Si → Accounts → open your YouTube account → Reconnect once. The warning now reads differently: Advanced → Go to … (unsafe). It's still your own app.

Test mode or production?

  1. Test mode: Google ends the sign-in after 7 days, even though Publit.Si renews the short access token by itself. Reconnect, or switch to production.

  2. Production: no 7-day limit. You only reconnect if you revoke access or Google asks you to sign in again.

  3. Which one am I in? Publit.Si can't tell from the token, and a working connection doesn't prove it. Look at Google Auth Platform → Audience → Publishing status: Testing or In production.

Check

Settings › Platform setup › YouTube shows every item as set, and Accounts shows your channel after connecting.

Troubleshooting

redirect_uri_mismatch
The redirect URI in the dashboard must match exactly, including http/https and port.
YouTube: "Access blocked: Google's review of … was not completed" (403 access_denied)
Your Google project is in test mode and your account isn't on the list yet. In your own Google project: Audience → Test users → + Add users, add the Google account you connect with, save and connect again (step 5.2). No Branding, domain or publishing is needed for this. The sign-in then lasts 7 days; to skip the weekly reconnect see step 5, "YouTube without the weekly reconnect".
YouTube: "Publish app" is disabled and asks to complete Branding
You only need this to skip the weekly reconnect; as a test user you can connect right away. Google wants a homepage, privacy policy and terms on your own domain. With the Cloudflare tunnel (step 3), your gateway serves all three: https://your-host/, /privacy and /terms. Add your domain under Authorized domains and save. See step 5, "YouTube without the weekly reconnect".
YouTube: "Google hasn't verified this app"
In test mode Google shows “You've been given access to an app that's currently being tested”: choose Continue. In production the unverified app shows Advanced → Go to … (unsafe). Both are fine for the project you created yourself. This warning differs from the blocked 403 screen, which needs a test-user entry in Testing.
YouTube asks to sign in again after a week
In Google's test mode the sign-in ends after 7 days. Reconnect, or switch your Google project to production (step 5, "YouTube without the weekly reconnect") and reconnect once.
YouTube: upload permission denied, insufficientPermissions or uploads ahead need reconnecting
Reconnect the account. On Google's permission screen the three YouTube boxes start unticked: tick Select all, then Continue. Uploading ahead with YouTube publishing later also needs permission to manage the uploaded video; without it, Publit.Si uploads at the scheduled time. For partial statistics, check the enabled APIs and granted permissions. If Google offers no way to grant access, inspect the policy or verification message rather than repeating the connection.
YouTube: quotaExceeded or uploadLimitExceeded
Check Settings → Limits today and the Google project's API quotas. Connected channels using the same project share its project quota; channels may also have their own upload limits. Publit.Si waits and retries rate-limited work. Project daily quotas reset at midnight Pacific Time; a channel limit may need a separate wait. Reconnecting does not raise a quota.

Stuck? Search the troubleshooting list or write to us . Leave out secrets and tokens.