问题
I'm developer and I want to upload a video on Api Youtube 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 api that with attachement the video :
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 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>."
}
}
回答1:
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 mid night west cost 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 penile 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.
回答2:
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
来源:https://stackoverflow.com/questions/47408723/youtube-quotas-exceeded