Youtube V3 API quota usage assist - google-api

I am currently working on an application that manipulates enormous streams of videos and I currently implement a "share on youtube" button so a user ( any user of the application that provided my app with an access token for his youtube account ) can share small parts ( lets say 2 to 7 minutes ) videos on their personal accounts.
In my understanding I require an application from youtube along the user's access key to upload anything. The problem is the application "general" quota is 10k units. Each video upload costs 1605 ( calculated ) units. Meaning that my application can upload up to 6 videos per day because it adds up on the general quota. Is there a way for those units to add up on the per-user quota basis?
If I request an increase to my quota ( lets say 1mil / approved ) that means I can upload ~623 videos.. What would happened if 100 users try to upload a video in their personal accounts ( using my application, thus my application key ) as this response is not reassuring but is also 2 years old.
The code is as straight forward as userSpecificConnection.uploadVideo(video) which creates a userConnection to youtube using the user access token and the application key.
This question seems similar to my question but is 3y/o without a clear answer on the problem that I am currently facing
To clear out my questions :
Is there a way to upload videos on the per-user quota?
As the application is just an intermediate for the users to upload videos to their personal accounts I will not be monitoring how many videos each user uploads to their personal accounts ( as they are personal ) BUT if a user uploads 50 the rest of the users will not be able to upload anything?
Is there a way to avoid this? ( blocking a user from uploading due to an other user reaching the limit ). The users are independent and should not limit each other.
I am not avoiding opening a request for increased quota. Just do not want to start a process that may not help me and will only consume someones time to review my application.

Is there a way to upload videos on the per-user quota?
All quotas are against your main quota. So if one user goes crazy and eats all your quota your other users are going to be stuck. Thats how the quota system works unfortunately its project based and not user based.
As the application is just an intermediate for the users to upload videos to their personal accounts I will not be monitoring how many videos each user uploads to their personal accounts ( as they are personal ) BUT if a user uploads 50 the rest of the users will not be able to upload anything?
You will get an error back stating that they have reached their quota limit for the day. You should just display that to them and let them know the quota will reset at midnight west cost USA time.
Is there a way to avoid this? ( blocking a user from uploading due to an other user reaching the limit ). The users are independent and should not limit each other.
Unless you keep track in your application how many uploads the user has made there is no way for you to know they have reached the limit without just trying to do an upload and getting the quota error. Dont worry to much about getting the quota error google doesn't count that errors like that against you just format it nicely for the user.
I am not avoiding opening a request for increased quota. Just do not want to start a process that may not help me and will only consume someones time to review my application.
My rule of thumb is when i have reached 80% usage daily for a quota i normally apply for extension. The youtube api quota can take time to get extended i have heard as long as six weeks.

Related

What is the limit for creating Calendar Events from a particular account per day, month and year?

I've tried to integrate google calendar API for Events creating. I would like to know if there is any limitations on the amount of Events that can be created for a day/month/year. If so how do I set to unlimited?
There are a few things you should know. First being that the Google Calendar api is under the same limitations as the Google Calendar website. There for all the limits that would apply to a user creating events in Google calendar will apply to a user using your Application creating events
Avoid Calendar use limits
The second think you need to under stand is quota limits for your project in Google Cloud console
There are two types of quotas project based and user based. Project based quotas limit your full project can make a cross all its users.
Then there is user based quotas which is the limit to the number of requests a single user can make in your project.
If you have a 10k request per minute quota for your project and each user has a 600 request per minute quota.
You can apply to extend the project based quota but not the user based quota.

YouTube Data API daily quota reduced to 0

For some reason, I started getting 403 errors on my app(in development), the errors message was
Access Not Configured. YouTube Data API has not been used in project XXXXXXXX....
This is weird because I was using the API for the last month or so with the same project, and didn't do any changes.
After looking in the project settings I noticed that the daily quota was reduced to 0.
The only thing concerning the API that I did was to request a quota increase in order to keep developing(The default quota stalled the dev on the search functionality of my app), but I didn't get any answer concerning that request other than asking for info, no warnings, or anything really.
I'm pretty sure that my app complies with the Terms of service, so I don't think that is the reason.
Any help would be appreciated. Thanks!
I would check your email it sounds like your project was disabled. Have you been though the verification process?
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.
I would check your email. I have several emails about projects i no longer use which have had the quota reduced to 0 over the last few weeks.
How to reset
No matter what the clients you have now are not going to work you need to reset the project.
Delete all client ids you have now.
deactivate then reactivate all APIs you need
Create new client ids keys
If you're trying to use an old project, then it's not gonna work. You'll have to create a new project.
Create a new project.
Enable Youtube API for it. (Your quota will be reset to 10,000/day)
Get new API key for it.
Use the new credentials.

Extending YouTube API Quota with limited funds

With a simple java program, I send GET requests using YouTube Data API specifically videos.list, in order to get the public metadata of a video and store it as .json files.
For my universities research, we have to do this with all available YouTube video IDs provided in the Youtube-8M Database.
Therefore, I would like to know if there is a way to extend the available quota for requests (I already know about the billing option, but I am a student and my university is small).
I have read the YouTube API terms, which states that only one project per client may be used to send such requests with the necessary API Key.
If I understand it correctly, even my simple java code is such a client.
In some other Stack Overflow questions about extending ones daily quota with API Keys, some suggested creating multiple accounts or projects.
Is this a legal option or not? Or is there another possibility to get a higher quota for simple requests used in research like I do right now?
If you go to the Google Developer console where you enabled the YouTube API. the second tab is called quota
Click the pencil next to which ever quota it is that you are blowing out. A new window will pop up with a link called apply for higher quota.
Fill out the form to apply. To my knowledge you do not have to pay for additional YouTube quota but it can take time to get approved. Make sure you comply with everything on the form.
I have never heard of the one project per client term. Technically you can run your application using different API Keys it should work fine. Technically there is nothing wrong with creating additional projects on Google Developer console. You don't need to go as far as creating another Google account.

Youtube API v3 - Can I get 50M quota per user if using Access Token(Oauth2)?

Can I get 50M quota per user if using Access Token(Oauth2) with Youtube Api v3?
Or will it be bound to my Project ApiKey, and therefore I will only get a quota of total 50,000,000 for my application ?
thx! :)
Quota usage for the YouTube API is project based not user account based.
So if I authenticate your application / project and make 10,000,000 requests, then you authenticate application and make 40,000,000 you will have blown the quota out.
There is one quota that is user based Per-user limit 3,000 requests/second/user but this can be gotten around by sending a random quotaUser with all of your request. This tells the API that each request comes from a different user, but I didn't tell you about this.

Get Google Calendar API Limit

Is there any way to get the requests quota of Google Calendar API by calling some API method in code?
I know that I can see the total and remaining requests count on the project dashboard. But, I want to fetch it in my application and display it to admin user on a web page for convenience so that he doesn't need to sign in to Google to view the quota.
Thanks
No there is no way to see how much of the Quota you have used on any of the Google APIs. I normally keep a running count of requests for display to the user. But there is no way to check what the over all quota usage is for the application.
I have done send feed back from the Developer console several times asking them to add an API. There are cloud monitoring APIs but nothing for monitoring quota usage.

Resources