我有登录凭据,可让我管理多个 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.
我建议你尝试的事情:
"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."
关于youtube - 如何避免 YouTube V3 API 中出现 cmsUserAccountNotFound?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41944419/