javascript Google Youtube Data API:带有 API 密钥的私人视频
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21890982/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google Youtube Data API: Private videos with API key
提问by Senica Gonzalez
So we have some training videos on youtube that are private. We want people that log into our system to be able to access those videos, but I don't want them to have to login with oauth.
所以我们在 youtube 上有一些私人的培训视频。我们希望登录我们系统的人能够访问这些视频,但我不希望他们必须使用 oauth 登录。
I want our app to do the authentication to OUR account and when our app uses the api, I want it to return private videos. (I'm fine with using the API key and limiting the referral)
我希望我们的应用程序对我们的帐户进行身份验证,并且当我们的应用程序使用 api 时,我希望它返回私人视频。(我可以使用 API 密钥并限制推荐)
I've played around with the api, but the api key does not return private videos.
我玩过 api,但 api 密钥不返回私人视频。
It always return an empty array of items.
它总是返回一个空的项目数组。
How can I do this?
我怎样才能做到这一点?
采纳答案by Ibrahim Ulukaya
You need to OAuth to your own account for that. Though you can do this without authenticating all the time. YouTube Data API: OAuth Authentication for services using V3 without user intervention
为此,您需要对自己的帐户进行 OAuth。尽管您可以在不进行身份验证的情况下执行此操作。YouTube 数据 API:使用 V3 的服务的 OAuth 身份验证,无需用户干预