'Using Api key responds with exceeded quota
I am trying to access the YouTube data api channels.list method. I have tested this method using the Try me page first to check the response

Now when it try to make that my call myself Using an api key it returns.
https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCezJOfu7OtqGzd5xrP3q6WA&key=XXXXXXXXXXXXXXXXXXXXXXX
result below
{
"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"
}
]
}
}
Can someone tell me what could be wrong i am setting the api key as directed. Yet its telling me that i have exceeded my quota.
Solution 1:[1]
The first thing i want to say is that you are making the request correctly. It actually looks like you copied the one directly out of Google Developers page try me app. All you did was add your own API key to it.
I can also tell by the error message that you have a valid api key, and that you have enabled the YouTube data api. So far so good you are doing everything right.
By the tone of your question it sounds to me like you have not gotten this to work at all. That you always get this error. So I am leaning wards cause number 2 below.
The error message.
There are two possible reasons for your error message. They both come down to the fact that you need quota to run requests against Google apis. YouTube data api has a bit of a diffrent type of quota though. Understanding YouTube api quota
- You have run a lot of requests and simply used up the default 10k quota. Solution: wait until tomorrow or apply for an extension.
- Your project has a default quota of 0. So you have no quota and need to apply for an extension. Solution: apply for an extension.
what is your quota?
Go to google cloud console under library find the YouTube data api and check what your quota is.
If your quota says 0 its because google has disabled the api in your project. My contacts at google have been unclear why some projects get their quota removed. The only solution is to apply for an extension. I have personally had projects with a YouTube data api quota of 0 on a project I just created. If I then create another new project then I will get the 10k quota.
You need quota to make requests, if you are using up all your quota then just apply for an extension. If your quota is 0 then you need quota apply for an extension.
Issue forum
Solution 2:[2]
While using the try-it feature in the documentation page, sometimes the quota error raises - even if you don't have the Google OAuth 2.0 checked.
That being said, if you're not querying your subscriptions or any other data that requires authorization for access your YouTube data, leave the option Google OAuth 2.0 unchecked.
If the error continues, try make the request in incognito mode, if even there continues, try a different query, if that also says the quota error, try to wait a few minutes.
Finally, if (after all these tests) you still get this error, consider stop using the try-it feature for a few hours due it might be an barrier for avoid multiple requests from your IP address.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Marco Aurelio Fernandez Reyes |


