YouTube quotas exceeded

48,293

Solution 1

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.

Solution 2

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.

Solution 3

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?

Solution 4

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.

Solution 5

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

Share:
48,293

Related videos on Youtube

Nicolas
Author by

Nicolas

Updated on January 19, 2022

Comments

  • Nicolas
    Nicolas over 2 years

    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>."
         }
    }
    
    • JJJ
      JJJ over 6 years
      I'm voting to close this question as off-topic because we're not customer support for Youtube.
    • DaImTo
      DaImTo over 6 years
      What is the exact message you are seeing there are a number of quotas it would be helpful to know exactly which one.
    • Nicolas
      Nicolas over 6 years
      @JJJ Can you give me email of contact then ;)
    • frosty
      frosty over 6 years
      I am experiencing this too. Did you figure it out?
  • Nicolas
    Nicolas over 6 years
    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.
  • DaImTo
    DaImTo over 6 years
    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.
  • Nicolas
    Nicolas over 6 years
    Yes, for upload a video you must set a accessToken.
  • DaImTo
    DaImTo over 6 years
    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 uploads
  • frosty
    frosty over 6 years
    @Nicolas 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..
  • Maor Cohen
    Maor Cohen about 6 years
    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.
  • Leo Galleguillos
    Leo Galleguillos over 5 years
    "little penile icon" 😭😭😭 Oh god I was in a serious programming mood and this almost made me fall out of my chair laughing 😭😭😭
  • user1941537
    user1941537 over 5 years
    I have the same issue. Any solution?
  • h2ooooooo
    h2ooooooo over 3 years
    Same thing worked for me just now. All other quotas were quite high, but daily limit was 0.
  • Hanane
    Hanane over 3 years
    I have the daily limit set to 0 too , but I can't edit it. where can I edit this value ?
  • Marten Koetsier
    Marten Koetsier over 3 years
    I could not edit this value. What worked for me, is what I described above.
  • Christopher Boyd
    Christopher Boyd over 3 years
    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.
  • Anand_5050
    Anand_5050 over 3 years
    I will try let c
  • Anand_5050
    Anand_5050 over 3 years
    Not working. It block by IP address i think.
  • Yassin Mokni
    Yassin Mokni about 3 years
    you can use a test user and skip publishing your google app
  • Meryan
    Meryan about 2 years
    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.
  • Meryan
    Meryan about 2 years
    I tried to request 100K it says "You can't request more quota because your project is not linked to a billing account." ???
  • DaImTo
    DaImTo about 2 years
    @Meryan 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-account
  • Meryan
    Meryan about 2 years
    @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? Thanks
  • DaImTo
    DaImTo about 2 years
    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_cost