YouTube quotas exceeded
Asked Answered
M

6

33

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>."
     }
}
Mytilene answered 21/11, 2017 at 8:45 Comment(4)
I'm voting to close this question as off-topic because we're not customer support for Youtube.Detruncate
What is the exact message you are seeing there are a number of quotas it would be helpful to know exactly which one.Subminiaturize
@Detruncate Can you give me email of contact then ;)Mytilene
I am experiencing this too. Did you figure it out?Baste
D
35

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.

Detrital answered 7/8, 2020 at 15:19 Comment(5)
Same thing worked for me just now. All other quotas were quite high, but daily limit was 0.Polyphyletic
I have the daily limit set to 0 too , but I can't edit it. where can I edit this value ?Skell
I could not edit this value. What worked for me, is what I described above.Detrital
I will try let cTheoretical
Not working. It block by IP address i think.Theoretical
M
13

Sharing some things we found out the hard way:

Quota:

  • The Quota number you see in google console equals "quota units", not "number of requests". For context, one insert request costs 1600 units.
  • When we first enabled the Youtube Data API on Google console, it gave us up a quota limit of 10000 but the "current quota" was set to 9600, so no video upload was possible. Just wait 24 hours.
  • Make sure to get authentication right first since the API counts "unauthorized" requests in the quota. That means 6 failed upload requests = 9600 quota = retry in 24h. Use something lighter like a list(my channel) request.

Auth:

  • Do not create a separate channel. Create a channel on your registered Gmail. You should be able to see your channel when shooting a list(my channel) request. The quota message still applies (and counts units) here, even if you are trying to upload to a channel that does not exist.
  • Service keys (used for machine-to-machine auth) don't work. Quota on those bound-to-fail requests still applies. You need to use OAUTH2. This standalone-scripts guide worked for us. Parts of the sample code provided will automatically handle fetching/refreshing the tokens for you.
Mastectomy answered 30/10, 2020 at 8:3 Comment(0)
S
12

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.

enter image description here

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.

Subminiaturize answered 21/11, 2017 at 9:35 Comment(13)
I understand the concept of quotas but I have never used the API so I do not understand why I'm blocked ... if it works will be it's the first video upload. I have the same settings as you for quotas in the google console.Mytilene
Have you authenticated your application? If you are getting that error message then its probably due to the fact that you have not authenticated the upload request properly.Subminiaturize
Yes, for upload a video you must set a accessToken.Mytilene
I think that you will need to include your code before anyone can help you fix your error. I would have to assume you are not properly applying the access token if as you say you have not made any previous uploadsSubminiaturize
@Mytilene Did you figure this out? I am experiencing the same problem. I have never used the captions API before and it's saying I hit my quota. I am ever sending the request through developers.google.com/oauthplayground and my quotas are fine in the Cloud console..Baste
Sorry for this question here but I filled a form in order to increase the quota limit 1.5 months ago but no response from google although I got a confirmation mail that everything I filled is alright. Did you face this problem? in the "API Client Name" I wrote the app name and I hope this is what they meant. Thanks for any clue\opinion what to do.Tagmeme
"little penile icon" 😭😭😭 Oh god I was in a serious programming mood and this almost made me fall out of my chair laughing 😭😭😭Warnerwarning
I have the same issue. Any solution?Histoplasmosis
I have recreated a new YouTube Data API project and the quotas are set to 10K per day, 180K per minute per user and 1,800K per minute, this does NOT make sense per day is smaller than per minute??? just in 2 days of development I reached 10K trying to debug a simple load all videos from a playlist, human (me) compile/run/test manual cycle. No infinite loops just the normal framework typically dual 2 pass rebuild of the views (like WPF, ionic, angular, react, etc...) I cannot increase the 10K it says make a request to google?? thanks for explaining what's going on.Advisee
I tried to request 100K it says "You can't request more quota because your project is not linked to a billing account." ???Advisee
@Advisee The 10k quota is a development quota used for testing. With the development quota you can only upload like six videos a day. A few years ago they started requiring a billing account to request higher quotas. Just create a billing account cloud.google.com/billing/docs/how-to/manage-billing-accountSubminiaturize
@DaImTo I am only searching videos not uploading why would I need to pay google money? Does this 10K daily quota goes against ALL my potential free app users? In other words is it compounded against the API Key, or is it computed for each user/session? ThanksAdvisee
Videos.list costs one quota point per request you make. As long as you dont make more then 10000 requests a day you shouldn't run out of quota. If you do then you need to request addental quota. developers.google.com/youtube/v3/determine_quota_costSubminiaturize
H
5

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?

Halfandhalf answered 7/10, 2020 at 2:16 Comment(3)
I think it may actually be the answer from @MartenKoetsier It seems that Google periodically disables quotas (as this just happened to me again). I know that once before I'd gotten an email warning saying that since I hadn't used it in 3 months, they were disabling access. If your quota is zero, there's no way to increase it without creating a new project.Paynim
you can use a test user and skip publishing your google appEpigenous
So this was just a rant? wtf does this have so many upvotes as an answer that it isn't?Kyanize
M
3

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

Mytilene answered 7/12, 2017 at 13:27 Comment(0)
S
1

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

Spreader answered 21/6, 2021 at 6:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.