使用youtube api v3上传视频:
错误导致上传无法完成 . 该服务youtube引发了异常:Google.GoogleApiException:Google.Apis.Requests.RequestError后端错误[503]错误[消息[后端错误]位置[ - ]原因[backendError]域[全局]]在Microsoft.Runtime.CompilerServices位于Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)的Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(任务任务)的.TaskAwaiter.ThrowForNonSuccess(任务任务),位于Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at c:\ code \ google.com \ google-api-dotnet-client \ default \ Tools \ Google.Apis.Release \ bin \ Debug \ test \ default \的Google.Apis.Upload.ResumableUpload1.d__e.MoveNext() Src \ GoogleApis \ Apis [Media] \ Upload \ ResumableUpload.cs:第459行
这个例外 . 我没有它想要的ida . 当我进入调试时它说:
找不到GoogleClientSecrets.cs,然后找不到NewtonsoftJsonSerializer.cs等 .
我已经使用了this code for upload但它有bug ...所以我使用的是:full code in pastebin . 在
var secrets = GoogleClientSecrets.Load(stream).Secrets;
它说无法找到GoogleClientSecrets.cs
我怎么解决这个问题?
一切都没关系 client_secrets.json 我的应用程序已在console.google.com中注册我昨天没有上传但1小时后它抛出此异常.. WTF它需要它吗?
I have tried this但结果相同
1 回答
这个简单的代码可以工作,
参考:https://developers.google.com/youtube/2.0/developers_guide_dotnet?csw=1#Direct_Upload