4

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?

iwocan
  • 266
  • 3
  • 13
  • Our docs are here: https://developers.google.com/youtube/v3/. For .NET, check out the sample code here: https://developers.google.com/youtube/v3/code_samples/dotnet – Ikai Lan Dec 19 '13 at 17:06
  • @IkaiLan Sir, this code is not proper i think. We couldn't work with it.There is many errors such as typo (i.e. Youtube-YouTube) Also we are still having a weird Error Code 400 Bad Request . Please help us. It's getting more and more confusing for us. – iwocan Dec 19 '13 at 17:15
  • Do you provide Resumable Upload samples for .NET in V3 ? – iwocan Dec 19 '13 at 17:27

1 Answers1

7

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.

Ibrahim Ulukaya
  • 12,767
  • 1
  • 33
  • 36
  • When uploading the video, it is very cumbersome to copy the URL to the website and get the code and input it at the terminal. Will use the API key instead of OAuth solve this problem? – Luk Aron Jun 14 '20 at 06:30