Youtube API:上传到开发者的帐户 [英] Youtube API: Upload to developer's account

查看:218
本文介绍了Youtube API:上传到开发者的帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我要实现的目标:

用户可以通过简单的网络表单将视频上传到我的youtube帐户.

Users are able to upload videos to my youtube account via a simple web form.

这是我没有得到的:

使用不赞成使用的ClientLogin身份验证可以做到这一点. 但是它没有使用OAuth 2.0身份验证,因为这总是将用户登录到自己的帐户,而不是我的帐户.正确的?如果没有,如何使用OAuth身份验证使用户能够将视频上传到我的youtube帐户?

This is possible using the deprecated ClientLogin authentication. But it is not using OAuth 2.0 authentication, because this one's logging the user always in to his own account, not mine. Correct? If not, how do I use the OAuth authentication to enable users to upload videos to my youtube account?

谢谢您的帮助!

推荐答案

Google的OAuth2授权服务器支持使用

Google's OAuth2 authorization server supports the use of Service Accounts. They are meant for exactly this use case. This should work for the Youtube API too.

您可以在Google的 API控制台中创建服务帐户.在那里,您将获得一个服务帐户电子邮件地址,您必须将其设置为备用电子邮件地址您用于YouTube视频的Google帐户.

You can create a Service Account in Google's API Console. There you get a Service Account email address, that you have to setup as alternative email address for the Google account you use for your Youtube videos.

这篇关于Youtube API:上传到开发者的帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆