Connect YouTube

A YouTube connection is one channel. Marketing uses it to post videos and read their numbers, and to run live broadcasts, send a live stream out and take part in its chat. It is your org's or a brand's. See Connections for how connecting works in general.

Ways to connect

  • Connect, through GreenMind's app, where it is open to your org.

  • Use your own app: an OAuth client in your own Google Cloud project, which has its own quota and its own review. Start at Google Cloud's credentials page; Google's guide to OAuth for web server apps explains the rest.

  • Post by hand instead, at the foot of the Use your own app dialog: you give the channel's name, GreenMind prepares each post and opens YouTube Studio for you to finish it, and nothing is held for the channel.

There is no key option.

Making your own app

  1. Open the Use your own app dialog for YouTube on the Connections page, and keep it open.
  2. In the Google Cloud console, choose or create a project.
  3. Enable the APIs. In APIs & Services > Library, enable YouTube Data API v3 and YouTube Analytics API. Without them Google refuses the calls, even with a valid sign-in.
  4. Set up the consent screen. In Google Auth Platform, fill in Branding (app name, support email, logo, your home page, privacy policy and terms addresses, authorized domain) and choose an Audience. An app for people outside your Google Workspace is External.
  5. Add the scopes. In Google Auth Platform > Data Access, choose Add or remove scopes, and under Manually add scopes enter the scopes below, one per line. Then Update and Save.
  6. Make the client. In Google Auth Platform > Clients, choose Create client, with type Web application. Under authorized redirect URIs, add the redirect URL from the dialog, copied exactly.
  7. Copy the client ID and client secret into the dialog and press Connect. Sign in to Google, choose the channel if Google asks which, and allow it.

Scopes

https://www.googleapis.com/auth/youtube.upload
https://www.googleapis.com/auth/youtube.readonly
https://www.googleapis.com/auth/yt-analytics.readonly
https://www.googleapis.com/auth/youtube.force-ssl

Add all four. What a connection asks for depends on what it is for. The Use your own app dialog lists the posting scopes, and the numbers scopes too if you tick Also read the numbers of what is posted. The live scope is not in it: Reconnect asks for all four, so use it to add live to a connection later.

Use Scopes
Post youtube.upload, youtube.readonly
Read post insights youtube.readonly, yt-analytics.readonly
Run live broadcasts, send a stream out, live chat youtube.force-ssl

Testing and verification

  • A consent screen in Testing lets in only the Google accounts listed as test users (Google Auth Platform > Audience), and a connection made in Testing mode typically has to be connected again after about a week.
  • Publishing the app lifts that. Until Google has verified it, an unverified app is limited to a small number of users and shows Google's unverified-app warning. Verification is Google's process, and it asks you to prove you own your domain.
  • Separately, YouTube audits an API project's use of video uploads. Until your project has passed the audit, YouTube may keep videos uploaded through the API private, so GreenMind uploads at the scheduled time and hands the video to YouTube Studio to make public if it stayed private. Once your project has passed the audit, tick My project has passed YouTube's API audit in the Use your own app dialog when you connect, and GreenMind uploads ahead of time as private and lets YouTube make the video public at the scheduled minute. Reconnect keeps the setting as it was, so for a connection already made, choose Use your own app again with the box ticked. That makes a second connection; Disconnect the first.
  • By default a Cloud project may upload 100 videos a day.

Webhooks

Nothing to set up in Google's console. YouTube's notifications about a channel's uploads and changes come through Google's own subscription service, which GreenMind subscribes to for you and renews.

If it goes wrong

  • Access blocked, or redirect URI mismatch. The redirect URI on the client differs from the dialog's, or your account is not a test user while the app is in Testing.
  • API not enabled. Enable YouTube Data API v3 and YouTube Analytics API in the same project the client belongs to.
  • Videos stay private. See the audit, above.
  • No refresh, or Needs reconnecting. A connection made in Testing mode stops after about a week. Reconnect, or publish the app. Removing the app's access in the Google account's security settings also stops it.