You Tube api只允许上传50次

时间:2017-02-28 20:16:28

标签: c# api youtube

我似乎只能使用你的管api上传50个视频/小时。我们为房地产客户制作视频,并且在过去一年或更长时间内能够按需上传视频,但截至昨天,它似乎已经受到限制。

还有其他人有这个问题吗?

我得到的Errror消息是"错误阻止了上传完成: 响应状态代码不表示成功:403(禁止)"

我如何上传视频的代码段

var video = new Google.Apis.YouTube.v3.Data.Video();

            video.Snippet = new VideoSnippet();
            video.Snippet.Title = ytVideo.YOU_TUBE_VIDEO_TITLE;
            video.Snippet.Description = ytVideo.YOU_TUBE_VIDEO_DESCRIPTION.Replace(">", "").Replace("<", "");
            video.Snippet.Tags = ytVideo.YOU_TUBE_VIDEO_TAGS.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
            video.Snippet.CategoryId = "22";

            video.Status = new VideoStatus();
            video.Status.PrivacyStatus = "public";
            video.Status.Embeddable = true;

            using (var fileStream = new FileStream(mp4, FileMode.Open))
            {
                const int KB = 0x400;
                var minimumChunkSize = 256 * KB;

                var videoInsertRequest = myService.Videos.Insert(video, "snippet,status", fileStream, "video/mp4");

                videoInsertRequest.ProgressChanged += videoInsertRequest_ProgressChanged;
                videoInsertRequest.ResponseReceived += videoInsertRequest_ResponseReceived;
                videoInsertRequest.ChunkSize = minimumChunkSize;
                videoInsertRequest.UploadAsync().Wait();
            }

0 个答案:

没有答案