Publit.Si

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 the tunnel from step 3 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: the tunnel from step 3

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.

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 your Developer contact email → 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.

That's all of Branding you need for test mode. The App domain links are only for production (below). A working client or connection doesn't mean production: Audience → Publishing status tells you.

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.

Being the project owner is not enough; you must be on this list. You don't need Branding links, a domain or “Publish app” for test mode.

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.

The localhost address belongs only here, never under Branding → Authorized domains. It needs no domain or tunnel.

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. Several channels? Google asks which one. Your own channel is listed under your name, not the channel name.

Done. In test mode Google ends the sign-in after 7 days; Publit.Si reminds you to reconnect.

Optional: no weekly reconnectNeeds the tunnel

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 (step 3). 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: homepage https://publish.example.com/, privacy policy https://publish.example.com/privacy, terms 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.

To reconnect, use Accounts → open the account → Reconnect. Don't disconnect first: that cancels scheduled posts.

Check

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

Common problems

Stuck? Write to us. We're happy to help. Leave out secrets and tokens.