如何通过 V3 .NET 使用 api 密钥将视频上传到 Youtube [英] How to upload videos to Youtube with api key by V3 .NET

查看:42
本文介绍了如何通过 V3 .NET 使用 api 密钥将视频上传到 Youtube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 V2 时遇到了一些问题(错误代码 400),所以我正在尝试从 V2 迁移到 Youtube Api V3.

I have some issues with V2 (Error code 400) so I'm trying to move to Youtube Api V3 from V2.

我使用的是 C#,我一直在寻找如何使用 V3 .NET 上的 api 密钥将视频上传到 Youtube

I'm using C# and I've been searching how to upload videos to Youtube with api key on V3 .NET

在哪里可以找到相关的示例、说明或文档?

Where can i find an example,explanation or a document for that?

推荐答案

https://developers.google.com/youtube/v3/code_samples/dotnet#upload_a_video

您需要通过 OAuth2.如果您尝试上传到自己的帐户,则此部分说明如何:https://developers.google.com/youtube/v3/guides/moving_to_oauth#standalone

You need to go through OAuth2. If you are trying to upload into your own account, then this segment explains how to: https://developers.google.com/youtube/v3/guides/moving_to_oauth#standalone

基本上,您通过一次并从那里保存令牌.

Basically, you go through once and save the token from there.

如果您甚至想跳过那一次,您可以在 OAuth2 中获取刷新令牌Playground 具有受尊重的范围,并将其直接插入到您的代码中,并带有客户端密钥和 ID.这样您的脚本就不需要网络浏览器了.

If you even want to skip that one time as well, you can get a refresh token in OAuth2 Playground with respected scopes and plug it in directly in your code, with client secret and id. That way your script won't need a web browser.

这是逐步解释此工作流程的视频.

这篇关于如何通过 V3 .NET 使用 api 密钥将视频上传到 Youtube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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