10

The problem occurred when I was using a Python program to upload videos to YouTube. I did not use it to upload for many days before this happened so it should not exceed the quota. I tried many times and it had the same error.

The following is the error:

[RequestError] Server response:

{
  "error": {
    "code": 403,
    "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
    "errors": [
      {
        "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
        "domain": "youtube.quota",
        "reason": "quotaExceeded",
        "debugInfo": "Code: 8; Description: ?metric=youtube.googleapis.com/default&limit=defaultPerDayPerProject&qs_error_code=INSUFFICIENT_TOKENS"
      }
    ]
  }
}
stvar
  • 6,551
  • 2
  • 13
  • 28
Patent 2018
  • 113
  • 1
  • 1
  • 4

2 Answers2

26

Taking into account the DTOS docs, it's very likely that you exceeded 90 days of inactivity w.r.t. your API credentials:

Inactivity

YouTube reserves the right to disable or curtail your access to, or use of, specific YouTube API Services if your API Project has been inactive for 90 consecutive days. For example, YouTube could revoke your API Credentials, or reduce (or eliminate) your API Project's quotas for specific YouTube API Services. If your API Client's quota is reduced or eliminated, you may reapply for quota or a quota extension, and YouTube will review that application based on YouTube’s determination of your expected use of the YouTube API Services.

You may follow the official recommendations stated above by applying for a quota extension. For obtaining a quota extension you have to address Google directly. There's this form that you'll have to fill in. Than wait for response -- which, according to the experience of users of this forum, doesn't arrive shortly.

Other option would be to just discard (delete) the current app from Google's developers console and create a new one that will have assigned a new daily quota amount (of usually 10,000 units).

stvar
  • 6,551
  • 2
  • 13
  • 28
  • 4
    Inactivity deactivation is what seems to have happened to me. I created the project last year, but just getting to it now, my quota is 0. I created a new project, enabled the API, and now I have 10k quota. Thanks. – ge022 Aug 04 '20 at 18:58
  • 1
    Yep, create a new project....ho hum...but it works! – bhu Boue vidya Mar 11 '21 at 10:06
0

I have the same issue, and the solution is quite simple. You just need to create a new project on console.cloud.google.com, then generate a new key and replace the old key with the new one. The API will be usable again.