youtube - 如何避免 YouTube V3 API 中出现 cmsUserAccountNotFound?

标签 youtube youtube-api youtube-data-api

我有登录凭据,可让我管理多个 youtube channel 。还有一个内容所有者帐户通过 YT 的 CMS 控制这些 channel 。

我正在尝试将视频上传到特定 channel 。据我了解,这需要 OnBehalfOfContentOwner 和 OnBehalfOfContentOwnerChannel 标志。我从 URL 的 'o' 参数(如 https://www.youtube.com/my_channels?o=[id] 中)获得了内容所有者 ID,并通过类似方式获得了 channel ID。但是,当我使用这个 OnBehalfOfContentOwner ID 调用 API 时,我得到一个 cmsUserAccountNotFound。当我在 YT 文档网站上使用具有相同 OnBehalfOfContentOwner ID 的 Channels:list API 时,也会发生这种情况。

有没有人遇到过这个问题?为了防止这种情况,我应该确保我的用户拥有哪些凭据?

我找到了一种解决方法,我为每个 channel 创建单独的请求 token ,但我希望能够动态选择上传 channel 。

最佳答案

这是您基于 Youtube Core API errors 得到的错误。 :

forbidden (403) cmsUserAccountNotFound The CMS user is not allowed to act on behalf of the specified content owner.



我建议你尝试的事情:
  • Videos.list 下,请确保:

  • "the CMS account that the user authenticates with must be linked to the specified YouTube content owner."



    完整声明here :

    "the CMS account must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. The parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value.

    The CMS account that the user authenticates with must be linked to the specified YouTube content owner. This parameter is intended for content partners that own and manage many different YouTube channels. The parameter enables those partners to authenticate once and get access to all of their video and channel data, without having to provide authentication credentials for each individual channel. Specifically in regard to this release, the parameter now enables a content partner to insert, update, or delete videos in any of the YouTube channels that the partner owns."


  • 查看this SO thread以获得更多见解。
  • 关于youtube - 如何避免 YouTube V3 API 中出现 cmsUserAccountNotFound?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41944419/

    相关文章:

    Javascript 用 YouTube 视频替换 IMG - 自动播放无法正常工作

    javascript - GreaseMonkey + YouTube + .click()

    javascript - Google Maps API-infoWindow填充屏幕中的嵌入式YouTube

    youtube-api - YouTube API key 在 Magento 中不起作用

    java - Eclipse luna中maven项目构建成功后如何运行

    youtube - 可使用默认嵌入播放的YouTube视频,但无法使用youtube api播放

    iframe - 动态更新网站上的youtube播放列表

    php - 如何获取特定类别中点赞数超过 X 的 YouTube 视频列表

    youtube - 我可以使用xml从youtube api获取页面 token 吗?

    youtube - 如何在没有 id 或用户名的情况下获取 channel url 的数据?