使用Youtube Data API将视频上传到youtube时达到的每日限制 [英] Daily limit reached when uploading video to youtube using Youtube Data API

查看:248
本文介绍了使用Youtube Data API将视频上传到youtube时达到的每日限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用youtube api构建项目.做测试时,我看到一个错误

I'm currently trying to build a project using the youtube api. When doing tests, I had an error which says

"The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>" 

我查看了Google云控制台,并看到了以下内容:

I looked at the google cloud console and saw these:

第一个屏幕截图显示我提出了38 + 13个请求,因此我真的应该还没有达到每日限制.

The first screenshot shows I made 38 + 13 requests so I really should have not reached the daily limit yet.

这是一个错误还是我不了解配额限制的工作原理?

Is this a bug or is it me who didn't understand how the quota limit works?

推荐答案

实际上,您正在显示的这些页面可能会造成混淆.

Indeed these pages you're showing maybe confusing.

但是您必须承认,YouTube的Data API配额系统没有考虑一个查询的数量.相反,API将 quota cost ,并因此计算了一个端点正在生成的所有端点调用的配额成本之和.

But you have to acknowledge that YouTube's Data API quota system is not accounting for the number of queries one is making. Instead, the API attaches to each kind of its endpoint a quota cost, and, thus, is accounting for the sum of quota cost of all endpoint calls one is making.

还值得注意的是,配额系统会将每个失败的端点调用(无论发生什么原因)都视为已完成的调用.

Also worth of noticing is that each failed endpoint call (for whatever reason that happened) gets accounted by the quota system as a completed call.

此外,任何给定的 Videos.insert API端点调用的配额成本为1600个单位(非常昂贵);分别指定任何 Channels.list API端点调用的配额成本为1个单位(非常便宜).

Furthermore, any given Videos.insert API endpoint call has a quota cost of 1600 units (very expensive); respectively, any given Channels.list API endpoint call has a quota cost of 1 unit (very cheap).

因此,通过基本算术,您可以验证您的API活动确实超出了分配的每日配额.

Consequently, by way of elementary arithmetic, you may verify that indeed you exceeded with your API activity the daily quota allocated.

这篇关于使用Youtube Data API将视频上传到youtube时达到的每日限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆