Unable to get fileDetails part when using YouTube videos API

↘锁芯ラ 提交于 2019-12-24 20:17:00

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!