问题
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}
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 Forbidden
Any help will be appreciated.
Thanks
回答1:
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.
来源:https://stackoverflow.com/questions/17180550/unable-to-get-filedetails-part-when-using-youtube-videos-api