无法使用YouTube视频API时获得fileDetails部分 [英] Unable to get fileDetails part when using YouTube videos API
问题描述
我想获得的使用YouTube API来自YouTube的视频列表。我使用的API密钥。当我使用下面的一切URL工作正常,我得到想要的结果:
GET <一个href=\"https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails&id=I6zuKbBlmRo&key=\" rel=\"nofollow\">https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails&id=I6zuKbBlmRo&key={YOUR_API_KEY}
I am trying to get a list of videos from YouTube using YouTube API. I am using an API key. When I use the URL below everything works fine and I get the desired results: GET https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails&id=I6zuKbBlmRo&key={YOUR_API_KEY}
但是,当我加入fileDetails的部分参数,我得到这个答复403 Forbidden错误:
GET <一个href=\"https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2CfileDetails&id=I6zuKbBlmRo&key=\" rel=\"nofollow\">https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2CfileDetails&id=I6zuKbBlmRo&key={YOUR_API_KEY}
But when I add fileDetails to the part parameter, I get a 403 forbidden error with this response: GET https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2CfileDetails&id=I6zuKbBlmRo&key={YOUR_API_KEY}
403禁止
任何帮助将AP preciated。
Any help will be appreciated.
感谢
推荐答案
从YouTube的APIv3文档:
From YouTube APIv3 Docs:
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.**
只有所有者才能获得这些属性。
Only the owner can get those properties.
这篇关于无法使用YouTube视频API时获得fileDetails部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!