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

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

问题描述

这是我想要实现的目标:

here's what I want to achieve:

用户可以通过简单的网络表单将视频上传到我的 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 授权服务器支持使用 服务帐户.它们正好适用于这个用例.这也适用于 Youtube API.

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天全站免登陆