How to upload videos to Youtube with api key by V3

2019-07-02 10:57发布

问题:

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

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?

回答1:

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

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.

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.

Here's the video explaining this workflow step-by-step.



标签: youtube-api