YouTube quotas exceeded

前端 未结 5 2218
南旧
南旧 2020-12-31 05:00

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

相关标签:
5条回答
  • 2020-12-31 05:38

    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 quotum of 10k per day. Problem solved.

    0 讨论(0)
  • 2020-12-31 05:41

    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?

    0 讨论(0)
  • 2020-12-31 05:42

    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.

    0 讨论(0)
  • 2020-12-31 05:49

    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.
    0 讨论(0)
  • 2020-12-31 05:51

    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

    0 讨论(0)
提交回复
热议问题