Youtube api v3 throws an exception at boot time

Download videos using youtube api v3 throws:

The error prevented the download from shutting down. Youtube service call excluded: Google.GoogleApiException: Google.Apis.Requests.RequestError Backend Error [503] Errors [Message [Backend error] Location [-] Reason [backendError] Domain [global]] in Microsoft.Runtime.CompilerServices.TaskAwaiter. ThrowForNonSuccess (task task) in Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (task task) in Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (task task) in Microsoft.Runtime.CompilerServices.ConfiguredaskTa 1.ConfiguredTaskAwaiter.GetResult() at Google.Apis.Upload.ResumableUpload 1.d__e.MoveNext () in c: \ code \ google.com \ google-api-dotnet-client \ default \ Tools \ Google.Apis.Release \ bin \ Debug \ test \ default \ Src \ GoogleApis \ Apis [Media] \ Download \ ResumableUpload.cs: line 459

This is an exception. I have no idea what she wants. When I go into debugging, it says:

GoogleClientSecrets.cs not found, then NewtonsoftJsonSerializer.cs not found, etc.

I have already used this code to download , but it has errors. So I use this: full code in pastebin . IN

var secrets = GoogleClientSecrets.Load (stream) .Secrets;

It says it can't find GoogleClientSecrets.cs

enter image description here

How can i solve this?

Everything is fine with client_secrets.json , and my application is already registered on console.google.com. I do not load yesterday, but after 1 hour it throws this exception .. WTF needs it

I tried this one but the same result

0
source share
1 answer

This simple code will work,

 Video newVideo = new Video(); newVideo.Title ="My Test Movie"; newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema)); newVideo.Keywords = "cars, funny"; newVideo.Description = "My description"; newVideo.YouTubeEntry.Private = false; newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag", YouTubeNameTable.DeveloperTagSchema)); newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122); // alternatively, you could just specify a descriptive string // newVideo.YouTubeEntry.setYouTubeExtension("location", "Mountain View, CA"); newVideo.YouTubeEntry.MediaSource = new MediaFileSource("c:\\file.mov", "video/quicktime"); Video createdVideo = request.Upload(newVideo); 

Link: https://developers.google.com/youtube/2.0/developers_guide_dotnet?csw=1#Direct_Upload

+1
source

All Articles