How to check Google SMTP current remaining quota? - google-api

I am using google smtp to send a lot of mails, but if I send too much mails it will return quota error.
So I want to check my quota anytimes.
But I didn't find any about this.
Is there any way like API to do this?

There is no way to check your quota via an api. You can check google developer console for your project manually but this is an estimate at the very best.
My advice is to keep a running total of the requests you are sending and try to space them out so that you don't hit any of the quotas.
Once you hit a quota error makes sure you stop and take a break for a little while, possibly implementing exponential backoff, but this depends upon which quota you are hitting.

Related

How long before new quota takes effect

I requested quota increase on the YouTube API though the google developer console from 10k to 100k.
I received a successful email, that says my increase has been approved
However if i check the UI in Google developer console it still states my quota is 10,000 per day.
When will my quota increase take effect?
The first thing i would do would be check that you are looking at the correct project. As this quota will be only valid for the project you applied for.
Then you need to edit the quota and increase it yourself. You should have that option to do that now. If you don't have that option I would wait a couple of days, to see if it doesn't kick in.
You might want to start sending requests and see if the quota increase is actually there its not not appearing in the UI yet.

YouTube API requests failing due to "Access Not Configured" (also: "queries per day" quota is locked to 0)

No matter what we try, all YouTube API requests we make are failing.
As we first thought this was a propagation issue, we waited out 10 minutes, then 30 minutes, 2 hours and now over 24 hours, to no avail.
We have found this thread, which covers a similar issue with an iOS app, but does not correspond to our use case.
Here is a run-down of what the problem is:
Activating the "Youtube Data API v3" API for our account shows as successful, and the API shows as enabled.
A POST to https://www.googleapis.com/upload/youtube/v3/videos (videos insert) consistently fails with the following error, despite the fact that we have waited hours for the API enabling to propagate:
Access Not Configured. YouTube Data API has not been used in project XXXXXXXXXXXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=928939889952 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Although the error does not directly point to this, our "Queries per day" quota for the YouTube Data API is showing as "0". We are not able to understand why this is showing as zero, and unfortunately, all attempts to edit it to something higher have failed, and disabling and then re-enabling the API has not solved the problem. In a completely separate project/account, this shows as "10,000" when enabling the YouTube Data API, and indeed video insert API calls work under that project.
This is a significant roadblock for us, as it prevents us from deploying our application: any help would be appreciated.
No access configured
Actually means that you dont have permission to access the api. It basically means you have enabled the api but dont have the quota to use it. Its different then the you have run out of quota error message.
After a strange change sometime last year by default the quota for the Youtube api is now 0. You need to request a quota extension it can take anywhere between a week to several months to get permission to use it.
It took me three months. No i dont have any idea how they expect anyone to develop a new application without any quota and to know ahead of time that they need to apply for quota in order to start developing their application. Its quite frustrating.

Increasing GA daily request quota

We have a self-hosted content management system which offers clients the ability to sync data from their GA profile with the content they maintain within the application. So, we're dealing with an arbitrary number of clients who can have an arbitrary number of profiles. Each client is required to simply enter their profile ID and request a token.
The issue we are running into is our Google Developer project is hitting its 50k/day quota pretty quickly, but Google has been unresponsive with our requests to increase this quota. Does anyone have experience with requesting an increase? If so, about how long did it take?
Aside from a quota increase, does anyone have suggestions on how we can avoid this situation?
It can take several weeks to get the quota set up. That is why it is recommended that you keep a check on your quota and request when you hit 80% of max. Only way to avoid it is to tune your requests don't request data you already have again store it in your system. if its an existing customer you should only be requesting the last few days worth of data. Everything else is static and shouldn't change.
How long ago did you request it and how critical is your problem?

Google Tasks API not using its increased quota

I have a Windows Phone Google Tasks app that has been growing in popularity and a couple months ago I realized I was hitting the Google Tasks API courtesy quota of 5,000 daily requests.
I was getting 403 "DailyLimitExceeded". Following the advice of multiple forums, I requested an increase and was eventually granted 20,000 daily requests.. However, it still seems that the 5,000 limit is blocking me. To get around this I have created two more projects and have my app round robin users between them to help balance load.
I am using OAuth so I don't think I'm hitting the anonymous have limits. The projects all list the quota as 20,000 and track towards that but my original project starts erroring right around 5,000.. I have not hit that high of usage on the new projects yet. I have also tried turning off the API and back on, but that didn't help.
Any ideas on how to fix this?
There was a bug in the quota increase process that prevented changes from going into effect. The bug has been fixed in code and should be released early next week.

Do calls to the Google Drive Changes feed count against API quota?

I have an application that needs to stay in sync with google drive. To that end, I'm using the Changes feed that is described on this page.
I know the idea is to poll the changes feed so that I don't have to request a list of files and do a comparison. Right now I have it set to query every 30 seconds, and initiate a sync operation when the latest change number is updated. But, to make the application feel a little more responsive, I would like to query API more frequently (but still initiate a sync only when necessary)
Given that, I was wondering if requests against the Changes feed count toward the API quota? I don't want to query more frequently if it's going to double my quota consumption rate.
It looks like requests to the changes API do count toward the quota. I found the Reports section in the cloud console. It gives a detailed breakdown of requests by user, location, method, and more. Looking through the methods, I found that drive.changes.list accounts for the majority of my usage.
It's unfortunate, but better than burning through the quota with multiple calls to get the status of every file.

Resources