Reputation: 5829
I'm developer and I want to upload a video using the YouTube Data API v3, but it always return the error code "quotas exceeded". I never succeeded upload a video so it's strange...
Do you have a solution for this problem or support address mail to contact in order to solve the problem ?
I send to the API that video with attachment:
curl --request POST \
--url 'https://www.googleapis.com/upload/youtube/v3/videos?part=snippet%2Cstatus' \
--header 'authorization: Bearer MyAccessToken' \
--header 'cache-control: no-cache' \
--header 'content-type: application/octet-stream'
Here is the error:
{
"error": {
"errors": [{
"domain": "youtube.quota",
"reason": "quotaExceeded",
"message": "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>."
}],
"code": 403,
"message": "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>."
}
}
Upvotes: 33
Views: 71735
Reputation: 3559
I had the same issue and found out that the "Queries per day" limit was set to 0. I created a new project, with a new key. The new project got a quota of 10k per day. Problem solved.
Upvotes: 36
Reputation: 71
I had the same problem BUT in Logger of Google Ads (from scripts section of Google Ads account). I know that limit is about 10k quota units. New day has come but limit hasn't updated. I deleted script from Google Ads, then created again and signed in Youtube account - and script started working.
Maybe this will help someone
Upvotes: 1
Reputation: 117281
All Google APIs have quotas. This is the number of requests that you can make over a given amount of time. Some of the quotas are based per day others can be per second or per hour.
{
"error": {
"errors": [
{
"domain": "youtube.quota",
"reason": "quotaExceeded",
"message": "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>."
}
],
"code": 403,
"message": "The request cannot be completed because you have exceeded your <a href=\"/youtube/v3/getting-started#quota\">quota</a>."
}
}
Its a little hard to tell which quota this is you are hitting i am gong to have to guess its one of the daily quotas. Once you hit this quota you will not be able to make any more requests until midnight West Coast USA time this is when your quota will reset.
If you go to the Google developer console and check the quota tab under the YouTube API some of these quotas can be increased by clicking the little pencil icon and seeing the number up. Contacting google will not help you in this case we all have the same quota for the API contacting them and asking for more wont help they are just going to tell you to increase it yourself.
It would also be a good idea for you to go though what requests you are making so that you are only requesting the data you really need rather then making a large number of requests for data you may not really need.
Note: I believe the upper limit for uploading videos per day is between twenty five and fifty. There is no way to increase this number it is a hard set quota.
Upvotes: 12
Reputation: 554
Sharing some things we found out the hard way:
Quota:
Auth:
Upvotes: 13
Reputation: 59
In early Oct 2020, I get this error too. FYI, my quota, on a fresh project and new fresh client after one attempt to upload one video (unsuccessful) shows 9,600 queries and there is a 10,000 query limit per day. Something seems broken. On https://console.developers.google.com on the OAuth consent screen, I do note that Scopes for Google APIs does not include YouTube video upload. If you have installed YouTube Data API v3, you can see that "../auth/youtube.upload" is one of the scopes available to add, but it is "Sensitive" and requires that your app be reviewed. Like, what app, Google? I'm just personally writing a script on my laptop to upload my videos to my own channel to save time. That should be an exception, but I get "Because you've added a sensitive scope, your consent screen requires verification by Google before it's published." Okay, sooo... "To protect you and your users, Google only allows applications that authenticate using OAuth to use Authorized Domains." In other words, not possible unless I write my script to run on a server?
Upvotes: 5
Reputation: 5829
Hello for resolve the problem you must use accessToken an apiClient and not that of the console oAuth Google. Api Client Youtube When I use accessToken of this console not working... :) Google oAuth Console
Upvotes: 3