我有一个 YouTube 用户,其中不包含 YouTube channel 。但是 YouTube 数据 API 确实返回了一个 channel ,如果我使用“mine=true”属性查询 youtube.channels.list API 方法,如下例 (1) .
例子:
(1) 返回一个 channel (mine=true;使用 OAuth):
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=snippet%252CcontentDetails%252Cstatistics&mine=true&_h=5&
此查询 (1) 返回一个包含 的 channel 。 channel ID .现在我尝试使用之前返回的 来查询该 channel 的播放列表。 channel ID .
(2) 返回404“channel not found”错误
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlists.list?part=snippet&channelId=UCIReEy02ibumfYhQP3-0drQ&_h=4&
如所述here可以使用没有 channel 但功能有限的 YouTube 帐户,例如使用播放列表:
With a Google Account, you can watch and like videos and subscribe to channels. However, without a YouTube channel, you have no public presence on YouTube. Even if you have a Google Account, you need to create a YouTube channel to upload videos, comment, or make playlists. You can use a computer or the YouTube mobile site to create a new channel.
什么原因查询 (1) 即使 YouTube 帐户不包含 channel ,也会返回 channel ?
BR
宁斯基
最佳答案
[1] 返回一个 channel (我的=true;通过使用 OAuth):
因为 youtube 上的每个帐户本身都是一个 channel 。他们可以像任何 channel 一样做所有他们想做的事情,例如上传视频。此外,我们可以在同一个帐户下制作多个 channel 。
[2] 不返回 channel (forUsername=UCIReEy02ibumfYhQP3-0drQ;通过/不使用 OAuth):
请确保 UCIReEy02ibumfYhQP3-0drQ 是有效的用户名
关于YouTube 数据 API 为没有 channel 的用户返回 channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55625462/