我正在尝试使用YouTube API从YouTube获取视频列表。我正在使用API密钥。当我使用下面的URL时,一切正常,我得到了预期的结果: 获取https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails&id=I6zuKbBlmRo&key= {YOUR_API_KEY}
但是当我将fileDetails添加到part参数时,我得到403 forbidden错误: 获取https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2CfileDetails&id=I6zuKbBlmRo&key= {YOUR_API_KEY}
403禁止
任何帮助将不胜感激。
由于
答案 0 :(得分:3)
来自YouTube APIv3文档:
The **fileDetails** object encapsulates information about the video file that was
uploaded to YouTube, including the file's resolution, duration, audio and video
codecs, stream bitrates, and more. **This data can only be retrieved by the video owner.**
只有所有者才能获得这些属性。