YouTube 数据 API:无需用户干预即可使用 V3 对服务进行 OAuth 身份验证 [英] YouTube Data API: OAuth Authentication for services using V3 without user intervention

查看:30
本文介绍了YouTube 数据 API:无需用户干预即可使用 V3 对服务进行 OAuth 身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施一项服务,一旦视频上传到不同的服务器上,该服务就会自动将视频上传到 YouTube 频道.

I'm implementing a service that automatically uploads videos to a YouTube channel once they are uploaded on a different server.

刚开始时,我使用的是 ClientLogin 身份验证和 YouTube API v2.0 – 直接上传 一切正常.但是,由于不推荐使用 ClientLogin,我正在尝试更新以使用 v3.0.

When I first started I was using ClientLogin authentication and YouTube API v2.0 – Direct Uploading and everything worked perfectly. However, since ClientLogin is deprecated, I'm trying to update to use v3.0.

我检查了此文档,它假定文件已存储本地,在我的情况下不是,并且此服务不会在我的本地计算机上运行,​​而且我无法获取 OAuth 2.0 的访问令牌.

I checked this documentation and it assumes that the file is stored locally, which in my case is not, and this service will not be running on my local machine, and I'm not able to get the access token for OAuth 2.0.

有人可以提供指导吗?

推荐答案

您可以通过从 OAuth2 Playground 并将其设置在您的 youtube 对象中.

You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.

这里有更多说明.

以及分步视频.

这篇关于YouTube 数据 API:无需用户干预即可使用 V3 对服务进行 OAuth 身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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