GLOstiq

Connect a YouTube Brand Channel

Create a Google app, authorise it, and link a YouTube Brand Channel so the API Bridge can read live chat and channel data.

What you're setting up & why it's fiddly

To pull data out of YouTube — live chat messages, broadcast info, channel stats — the API Bridge talks to the YouTube Data API v3 on Google. That requires a one-time setup: a Google Cloud project (the "app"), an OAuth credential, and a person with the right role on the channel clicking Allow once. After that, GLOstiq holds a refresh token and reads the channel headlessly.

Heads up

The single biggest gotcha: YouTube has two different ways to share a channel, and only one of them is visible to the API. Get this wrong and every call fails with a confusing permissions error even though everything "looks" connected. Read the Brand Channel vs Studio permissions section before you start.

Google Cloud project — the app identity that calls the API (steps 1–4).

OAuth consent — the channel owner/manager signs in once and approves the scopes (step 6).

Brand Channel access — the signing-in account must manage the channel at the Google-account level, not just via a Studio email invite (step 5).

Step 1 — Create a Google Cloud project

1

Go to console.cloud.google.com and sign in.

2

In the top project picker, click New Project.

3

Name it something recognisable (e.g. GLOstiq-YouTube) and Create.

4

Make sure that new project is selected in the picker before continuing.

Step 2 — Enable the YouTube Data API v3

1

In the left menu open APIs & Services → Library.

2

Search for YouTube Data API v3.

3

Open it and click Enable.

Note

The API gives you a daily quota (10,000 units by default). Listing live chat is cheap, but continuous polling of a busy chat adds up — you can request a quota increase from Google later if needed.

This is the screen the channel owner sees when they approve access. Open APIs & Services → OAuth consent screen.

1

Choose User type: External and Create.

2

Fill in App name, User support email and a Developer contact email. The rest can stay blank.

3

On the Scopes step you don't have to add anything here — GLOstiq requests them at sign-in time.

4

On the Test users step, click + Add users and add the email of every person who will sign in — including the channel owner (e.g. Amy). Save.

Heads up

While the app is in Testing mode, ONLY emails on the Test users list can authorise — everyone else is blocked with "Access blocked: app hasn't completed verification". For internal use you can stay in Testing indefinitely; just keep the test-user list current. Publishing the app is only needed for public, unlisted-to-Google use.

Step 4 — Create the OAuth client credential

1

Open APIs & Services → Credentials → Create credentials → OAuth client ID.

2

Application type: Web application.

3

Give it a name (e.g. GLOstiq Web).

4

Under Authorized redirect URIs, add the exact callback URL shown in GLOstiq's API Bridge credential setup (see step 6). It must match character-for-character.

5

Click Create, then copy the Client ID and Client secret — you'll paste these into GLOstiq.

Heads up

The Client secret is sensitive — treat it like a password. Paste it into GLOstiq's secrets/credentials store, never into a public file or a chat message.

Step 5 — Brand Channel vs Studio permissions (the critical bit)

YouTube lets you share a channel two completely different ways, and the API can only act as a channel for one of them:

Brand Account managers — added at myaccount.google.com/brandaccounts → Manage permissions (Google-account level). These accounts appear in the OAuth "Choose a channel" picker and can act as the channel via the API.

Studio permissions — invited by email under YouTube Studio → Settings → Permissions. Great for the Studio web UI, but invisible to the API — these accounts only ever see their own personal channel when they sign in.

So whoever signs in for GLOstiq must be a Brand Account manager (or owner) of the channel — a Studio email invite is not enough. To grant it:

1

The channel owner goes to myaccount.google.com/brandaccounts.

2

Selects the channel (e.g. *The Ultimate FanCave*) → Manage permissions.

3

Adds the signing-in person as Manager (or Owner) there — this is separate from any Studio email invite they may already have.

Tip

Quick test of which world you're in: after granting access, have that person re-run the sign-in. If the channel now appears in the "Choose a channel" picker, you're set. If only their personal channel shows, the grant was a Studio invite, not a Brand Account role — fix it at brandaccounts, not in Studio. If you can't get a Brand Account role at all, the owner can simply do the sign-in in step 6 themselves.

Heads up

Many YouTube channels can't grant API-level managers at all. Open the channel at myaccount.google.com/brandaccounts — if its details read "Brand Account (limited to YouTube)" and the Users section shows no *Manage permissions* control (only a "Learn how to manage access" link), then this account type has no Google-account-level roles to add. Studio email invites are the only sharing it supports, and those are invisible to the API. In that case there is no way to give a second person API access: the primary owner must do the step 6 sign-in themselves — the channel will appear in the picker for them because they own it.

With the Google side ready, connect it from the room's API Feeds tab. See The API Bridge for the surrounding editor.

1

Open API Feeds → Credentials and add a new YouTube credential.

2

Paste the Client ID and Client secret from step 4.

3

Copy the redirect URI GLOstiq shows and confirm it's in your Google credential's Authorized redirect URIs (step 4).

4

Click Connect / Sign in with Google. Sign in as the Brand Channel owner/manager (incognito helps avoid the wrong Google session).

5

At the Choose a channel screen, pick the Brand Channel — not a personal channel — and approve the scopes.

Note

GLOstiq requests read-only access to list channel data and live chat. Posting or moderating chat needs a broader scope (youtube.force-ssl); enable that only if you actually need to write back.

Step 7 — Confirm you linked the RIGHT channel

Because it's so easy to authorise as a personal channel by mistake, always verify the identity after connecting. GLOstiq shows the connected channel's name and ID — check it matches the channel you intended.

The connected channel ID must be the Brand Channel's ID (it starts with UC…).

If it shows a personal channel instead, you signed in as the wrong identity or via a Studio invite — revisit step 5, then disconnect and reconnect.

Common API calls & parameters

Every call is an HTTPS request to a URL beginning with https://www.googleapis.com/youtube/v3, sent with the connected credential's access token in an Authorization: Bearer <token> header. Each example below is the full URL you'd call — copy it and replace the UPPERCASE placeholders with your own values.

The part parameter is required on every call: it's a comma-separated list of the data sections you want back (e.g. snippet, status). Asking for fewer parts returns less data and uses less quota.

Endpoints at a glance

channels.list

Identify the connected channel

liveBroadcasts.list

List your live / scheduled broadcasts → liveChatId

search.list

Find public live streams on any channel

videos.list

Get a stream's activeLiveChatId & stats

liveChatMessages.list

Read the live chat feed

liveChatMessages.insert

Post a chat message (force-ssl)

commentThreads.list

Read comments on uploaded videos

channels.list — identify the connected channel

Confirm which channel the credential is acting as — the identity check from step 7.

RequestGET https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true

part

Required — data sections to return, e.g. snippet,statistics

mine

Required filtertrue for the signed-in channel (or use id / forHandle instead)

id

Optional filter — a specific channel ID, UC…

forHandle

Optional filter — a channel handle, e.g. @name

Returns — the channel's id (a UC… value) and snippet.title.

liveBroadcasts.list — your live / scheduled broadcasts

The owner-only way to find your broadcasts and, crucially, their liveChatId. Requires OAuth as the channel.

RequestGET https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet,status&broadcastStatus=active&broadcastType=all

part

Required — e.g. snippet,status

broadcastStatus

Required filteractive (live now), upcoming (scheduled), completed, or all (or filter by mine=true / id)

broadcastType

Optionalall to include every broadcast type

maxResults

Optional — how many to return, 150

Returns — each broadcast's snippet.liveChatId, plus status.lifeCycleStatus (created / ready / testing / live / complete).

search.list — find any public live stream

Find live videos on a channel even if you don't own it (works with just an API key for public streams).

RequestGET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC_CHANNEL_ID&eventType=live&type=video

part

Requiredsnippet

channelId

Required — the channel to search, UC…

eventType

Requiredlive (or upcoming / completed)

type

Requiredvideo (must accompany eventType)

Returns — each result's id.videoId; pass it to videos.list to get the chat ID.

Heads up

search.list is expensive — 100 quota units per call (out of 10,000/day). Prefer liveBroadcasts.list whenever you own the channel.

videos.list — a stream's chat ID & status

Get details for a specific video/stream, including the chat ID for any public live stream (not just your own).

RequestGET https://www.googleapis.com/youtube/v3/videos?part=snippet,liveStreamingDetails&id=VIDEO_ID

part

Requiredsnippet,liveStreamingDetails

id

Required — the video / stream ID

ReturnsliveStreamingDetails.activeLiveChatId (the chat ID to poll), plus concurrentViewers and actualStartTime / scheduledStartTime.

liveChatMessages.list — read the chat feed

The message feed itself. Poll it in a loop, respecting the interval it returns.

RequestGET https://www.googleapis.com/youtube/v3/liveChat/messages?part=snippet,authorDetails&liveChatId=LIVE_CHAT_ID

part

Requiredsnippet,authorDetails (author = name, channel ID, badges)

liveChatId

Required — from liveBroadcasts.list or videos.list

pageToken

Optional — the previous response's nextPageToken, to fetch the next batch

maxResults

Optional2002000

ReturnspollingIntervalMillis (wait this long before calling again), nextPageToken, and each message's snippet.displayMessage and snippet.publishedAt.

liveChatMessages.insert — post a chat message

Send a message as the channel. Needs the broader youtube.force-ssl scope (not read-only).

RequestPOST https://www.googleapis.com/youtube/v3/liveChat/messages?part=snippet

part

Requiredsnippet

request body

Required — JSON: snippet.liveChatId, snippet.type = textMessageEvent, snippet.textMessageDetails.messageText

Scope — requires youtube.force-ssl (write access), not the read-only scope.

commentThreads.list — comments on uploaded videos

For regular video comments, which are different from live chat (no live stream required; public comments work with just an API key).

RequestGET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet,replies&videoId=VIDEO_ID

part

Requiredsnippet,replies

videoId

Required — the video whose comments you want

allThreadsRelatedToChannelId

Alternative to `videoId`UC… for every comment on the channel

order

Optionaltime or relevance

maxResults

Optional1100; use pageToken to paginate

Tip

Typical live-chat flow: liveBroadcasts.list (broadcastStatus=active/upcoming) → take its liveChatId → loop liveChatMessages.list with pageToken, sleeping pollingIntervalMillis between calls. For a stream you don't own, swap the first step for search.list → videos.list to get activeLiveChatId.

Troubleshooting

"The user is not enabled for live streaming" (liveStreamingNotEnabled)

Authentication actually worked — this is a channel-capability error, not an auth one.

Most common cause: you're connected as a personal channel that has no live streaming. Re-check step 5 / step 7.

If it's genuinely the right channel: enable live streaming at youtube.com/features (needs phone verification; first activation can take up to 24 hours).

"Method doesn't allow unregistered callers" / PERMISSION_DENIED

The request reached Google with no credentials attached — the access token is missing or expired.

Reconnect the credential in GLOstiq so a fresh token is issued.

"Access blocked: app hasn't completed verification"

The signing-in email isn't on the Test users list while the app is in Testing mode — add it (step 3) and retry.

The Brand Channel never appears in the picker

The account has a Studio invite, not a Brand Account role. Add it at myaccount.google.com/brandaccounts (step 5).

As a fallback, have the channel owner do the sign-in instead.

Scheduled stream shows an empty chat

Expected: an upcoming broadcast has a chat ID but messages only flow once chat opens at/near go-live (or in "testing" mode).

To verify end-to-end now, hit Go Live / preview on the broadcast and post a message as the channel.