Closed general

Feature: YouTube upload support (scope, API enablement, audit, onboarding)

John Lauer · 22d ago ·closed by John Lauer

Feature request: first-class YouTube upload

What happened. We needed to upload a video to our org's YouTube channel ([email protected]) as unlisted from a container. There is no YouTube helper, only the generic api passthrough, and it hit three walls in a row:

  1. Scope. youtube / youtube.upload aren't in the default "full" scope set. adom-google --account media scopes --require youtube.upload youtube --auto-widen worked fine (one Allow click, existing scopes kept).
  2. API not enabled. Every call then returned: YouTube Data API v3 has not been used in project 432727599812 before or it is disabled. Project 432727599812 is Adom's shared OAuth client (the adom-google app behind the gateway).
  3. Audit restriction (not hit yet, but expected). Per YouTube API Services policy, videos.insert uploads from an unaudited API project are locked to private, so privacyStatus: unlisted would not stick until the project passes YouTube's API compliance audit.

We fell back to driving YouTube Studio in pup, which also needs a native file dialog because pup has no file-input verb.

Asks

  • adom-google youtube upload <file> --title --description --privacy unlisted|private|public [--playlist] [--thumbnail]: a resumable upload (the video endpoint needs a resumable/multipart upload, not the JSON passthrough), printing the watch URL and the privacy status YouTube actually applied, and warning loudly if it was forced to private.
  • Optional YouTube scope bundle. Keep YouTube out of the default set, but make --require youtube a documented, supported widen with a clear message.
  • Enable YouTube Data API v3 on Adom's shared client (project 432727599812), and decide whether to submit that project for the YouTube API audit so unlisted/public uploads work.
  • Onboarding. Have adom-google-onboarding enable YouTube Data API v3 in each new org's own Google Cloud project, and document the audit step, so other orgs get the same capability without a surprise.
  • Doctor/hint. When the passthrough gets SERVICE_DISABLED for any API, print which project, which API, and the console link, and say whether it's Adom's shared client (Adom admin fixes it once) or the org's own client (the org's admin fixes it).

Scope of the fix

Enabling the API on project 432727599812 fixes it for everyone who signs in through Adom's shared client. Orgs onboarded with their own Google Cloud client need it enabled in their own project, which is why the onboarding change matters.

2 Replies

John Lauer · 22d ago

Update 2026-09-28:

  • Enabled YouTube Data API v3 on Adom's shared client project (432727599812, "Adom Google", ID rock-verbena-498614-c2). Verified: adom-google --account media api https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true now returns the Adom Industries channel.
  • Scope widen worked as described (--require youtube.upload youtube --auto-widen, one Allow click).
  • For today's unlisted upload we used YouTube Studio in pup instead of the API, because unaudited-project uploads land as private. pup has no file-input verb, so the Windows Open dialog was driven with desktop_ui_set {name:"File name:", role:"edit", submit:true}. A pup file-input verb would make this path cleaner too.
  • Still open: the youtube upload command, the YouTube API audit for this project, and onboarding enabling the API for other orgs' projects.
John Lauer · 22d ago

Shipped in 0.8.27. All five asks are in, and one of the open questions is answered: no YouTube audit is needed, at least for unlisted and private.

youtube upload (+ friends)

adom-google youtube upload clip.mp4 --title "Demo" --privacy unlisted [--playlist <id>] [--thumbnail cover.png] [--json]
adom-google youtube channels | list --max 10 | delete <video-id> --yes

Resumable session then chunked PUT with real 308/Range handling, so a dropped connection resumes (it asks YouTube how much it already has instead of restarting). Progress on stderr, --chunk-mb tunable. delete takes ONE id, refuses without --yes, and names the video first.

The audit question, answered empirically

I uploaded two throwaway clips to the Adom Industries channel through the API and read the privacy back from a fresh GET, not from the insert response:

test requested applied honored
50 KB clip unlisted unlisted yes
6.8 MiB, 3 chunks at 2 MiB private private yes

So videos.insert on project 432727599812 is not locked to private, and privacyStatus: unlisted sticks. The Studio-in-pup workaround is no longer needed for unlisted uploads. I deleted both test videos afterwards using the ids captured at creation; the channel is back to its five real videos.

I did not test public, since that would publish on the real channel. If public turns out to be restricted later, the command already handles it: it compares requested against applied and warns loudly with both fixes (flip it in Studio, or submit the audit form) rather than reporting a plain success. --json carries privacy_requested, privacy_applied and privacy_honored so a caller can branch.

Scope bundle

YouTube stays out of safe/full/personal by design. The documented widen is the one you used:

adom-google scopes --require youtube.upload youtube --auto-widen

Onboarding

onboard now enables YouTube Data API v3 as part of the one-click API enable for a new org's own Cloud project (10 APIs now). Enabling an API costs nothing, and the alternative is exactly what bit us: the first upload fails with SERVICE_DISABLED months later, when nobody remembers where the project lives.

Doctor hint

A SERVICE_DISABLED 403 already named the project, API and console link. It now also names whose admin fixes it:

  • Adom's shared client, so an Adom admin enables it once and everyone is fixed (ask in #kel, do not make your own client);
  • the org's own client, resolved from <org>/org-settings, so that org's Cloud admin fixes it;
  • or your own client.

Not in scope here

The pup file-input verb you mentioned belongs to pup-bridge, not this package. Worth its own issue there if the Studio path is still needed for anything.

Log in to reply.