YouTube Data API: The request cannot be completed because you have exceeded your quota, INSUFFICIENT_TOKENS

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"
      }
    ]
  }
}

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).