Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

AI agents cannot invite reviewers to private YouTube videos via YouTube Data API

未关闭
#3,932 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
32/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
领域
api

调研方向

从链接的复现仓库开始,使用文档中说明的环境变量运行 index.ts,并检查其使用 part=recipients 的直接 videos.update 请求。将该请求与 YouTube videos API 文档和相关 issue #3626 进行比较;完成标准是确认存在受支持的 API/客户端接口,可用于添加、列出和移除受邀观看者,或明确记录不存在这样的接口。

由索引模型根据 Issue 内容生成。

描述

Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
Image

Errors from the screenshot:

Property "recipients" does not exist in object specification.

You have invalid or missing required parameter values above. If you execute anyway, the response will likely be an error.

API response from the screenshot:

{
  "error": {
    "code": 400,
    "message": "'recipients'",
    "errors": [
      {
        "message": "'recipients'",
        "domain": "youtube.part",
        "reason": "unknownPart",
        "location": "part",
        "locationType": "parameter"
      }
    ]
  }
}
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

https://github.com/karlhorky/repro-youtube-api-private-video-recipients

A step-by-step description of how to reproduce the issue, based on the linked reproduction.
  1. Clone the linked reproduction repository.
  2. Set YOUTUBE_ACCESS_TOKEN to an OAuth access token for the Google account that owns the test video.
  3. Set YOUTUBE_VIDEO_ID to the ID of a video owned by that account.
  4. From the repository root, run:
    YOUTUBE_ACCESS_TOKEN='...' YOUTUBE_VIDEO_ID='...' node index.ts
  5. The script calls the YouTube Data API videos.update endpoint directly with fetch, using part=recipients.
  6. The request body includes the video ID and an attempted invited-viewer list.
  7. The API rejects the request because recipients is not a supported part.

Expected: the API supports adding invited viewers to a private YouTube video, or documents the supported equivalent.

Actual: the API rejects the request before any invited-viewer validation can happen, because there does not appear to be a supported API surface for private-video invited viewers.

A clear and concise description of what the bug is, and what you expected to happen.

AI-agent workflow blocked: AI agents can upload or update private YouTube videos through the API, but cannot invite specific human reviewers to those private videos.

(also applies to regular scripts and other automation)

YouTube Studio supports account-based access control for private videos: a creator can invite specific Google accounts by email address to view a private video.

The YouTube Data API and generated Node.js client do not appear to expose this same capability.

I expected the API to allow automation of the same private-sharing workflow available in YouTube Studio:

  • Set a video to Private
  • Add invited viewers by email address / Google account
  • List invited viewers
  • Remove invited viewers

Instead, the API rejects the recipients part as unsupported.

This blocks AI agents (for example with Antigravity CLI or Codex CLI or Claude Code, etc). A common agentic workflow is:

  1. Upload or generate a draft video
  2. Keep it private
  3. Invite a specific reviewer, client, student or teammate
  4. Wait for human review
  5. Update the video, publish it later or revoke access

Because the API cannot manage invited viewers, AI agents and other automation systems using private videos are pushed toward:

  1. brittle browser automation against YouTube Studio using Playwright MCP or similar
  2. unofficial client libraries that depend on undocumented YouTube Studio internals, such as https://github.com/adasq/youtube-studio
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

I expect this behavior because YouTube Studio already supports this private-video sharing workflow in the UI:

Video:

https://github.com/user-attachments/assets/4dbacac6-28bb-462c-898f-6ae0a672de67

Screenshots:

Image Image Image

The YouTube Data API currently documents status.privacyStatus for videos, including private, but there does not appear to be a documented way to manage the invited users for a private video:

https://developers.google.com/youtube/v3/docs/videos

This means there is a mismatch between YouTube Studio functionality and the public API/client surface.

A related earlier report also ran into the same missing API surface when trying to use a recipients part:

Expected behavior:

The API should expose a documented way to manage private-video invited viewers, for example:

  • Adding invited viewers: support a privateSharing / recipients part on videos.update, a videos.permissions.insert method or another documented endpoint for adding account-based private video access
  • Listing invited viewers: support a privateSharing / recipients part on videos.list, a videos.permissions.list method or another documented endpoint for reading the current invited-viewer list
  • Removing invited viewers: support a privateSharing / recipients part on videos.update, a videos.permissions.delete method or another documented endpoint for revoking account-based private video access
  • Validating invited viewers: return clear errors for invalid emails, non-Google accounts, quota issues and permission issues

At minimum, the API should support:

  • Adding invited viewers
  • Listing invited viewers
  • Removing invited viewers
  • Returning clear validation errors for invalid emails, non-Google accounts, quota issues and permission issues
主要语言
TypeScript
星标
12.3k
派生
2k
平均合并
1 天 19 小时
30 天内合并 PR
21

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

googleapis/google-api-nodejs-client 的其他 Issue

查看 googleapis/google-api-nodejs-client 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。