What is the daily file sharing limit in the google cloud API and how do I raise it? - google-drive-api

I get this error:
{'errors': [{'domain': 'usageLimits', 'reason': 'userRateLimitExceeded', 'message': 'Rate limit exceeded. User message: "Sorry, you have exceeded your sharing quota."', 'locationType': 'other', 'location': 'user.sharing'}], 'code': 403, 'message': 'Rate limit exceeded. User message: "Sorry, you have exceeded your sharing quota."'}
But I can't see this limit in the cloud console. It seems like the daily limit is 100 files, but I need to raise it for my application.

1. Check the quotas
Confirm what's the specific API you're calling and monitor it
2. Limits are by request not by files
You have a limit of 10,000 every 100 seconds per project per user, so it's likely you're making a lot of requests in a short period of time
3. Implement exponential backoff
An exponential backoff algorithm retries requests exponentially, increasing the waiting time between retries up to a maximum backoff time
4. If all of the above is already checked, request an increase
Go to the Cloud Console and sign in as a Google Workspace super administrator.
From the Project list, select the project you're using for the migration.
On the left, click IAM & admin > Quotas.
Using the checkboxes, select one or more quotas to edit, then click Edit Quotas.
Note: Billing must be enabled on the project in order to click the checkboxes.
In the Edit Quotas panel on the right, complete the form with your Name, Email, and Phone details, then click Next.
In the Edit Quotas panel, select the service to expand the view, then edit the quotas in that service to your requested limit. Click Done.
Click Submit request.

Related

googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded

I understand the error is part of API quota limits but i have not been able to find a way to;
Track usage
Know when API limit resets
I have ran through information in stackoverflow and google dev portals still can't find any clear guidance.
Can any one provide clear guidance if available?
From this article:
If you are experiencing errors such as "User Rate Limit Exceeded", you are reaching or exceeding your destination Google Gmail, Calendar or Drive account's API quota. These quotas usually reset after a 24 hour period, and migrations can be rerun / continued.
You can apply the suggestion actions from the Google documentation:
Batch the requests.
Use exponential backoff to retry the request.

Google maps geocode api free daily limit get over in one hit, it happening due to I not enable billing?

I am hitting below URL to test my key
https://maps.googleapis.com/maps/api/geocode/json?latlng=20.0041,73.7175&key=$key
it show this an error after one hit
{
error_message: "You have exceeded your daily request quota for this API. If you did not set a custom daily request quota, verify your project has an active billing account: http://g.co/dev/maps-no-account",
results:[],
status: "OVER_QUERY_LIMIT"
}
Please help me why it is happening, anything to do with enable billing?
As stated in the comments to the question, you need to enable billing, even if you are only using the free quota. See the docs about this change for more information.

Google Map Services(Places) returning error message "You have exceeded your daily request quota for this API." But I've used it just for a while

I am using Google Maps service (Places, directions). After using for a while I am receiving response :
{ "error_message" : "You have exceeded your daily request quota for this API.", "predictions" : [], "status" : "OVER_QUERY_LIMIT"}.
I found this link Usage limits for services when used with Google Maps Javascript API v3. In this link it is mentioned that "Places API allows 1,000 or 100,000 (if you're verified) requests per 24 hours." But i have not requested it even for 200 times.
Is there some other reason for this response or is there any alternative to get rid of this problem. Thanks in advance.
Usage Limits for Google Maps API Web Services
Yes. There is another possible reason for getting the "Over query" message. And it's a common problem. If you make subsequent query requests too quickly, Google will respond with the over query limit message you posted.
From the Google API spec
Usage limits exceeded
If you exceed the usage limits you will get an OVER_QUERY_LIMIT status code as a response.
This means that the web service will stop providing normal responses and switch to returning only status code OVER_QUERY_LIMIT until more usage is allowed again.
This can happen:
Within a few seconds, if the error was received because your
application sent too many requests per second.
Some time in the next 24 hours, if the error was received because
your application sent too many requests per day. The time of day at
which the daily quota for a service is reset varies between customers
and for each API, and can change over time.
Add delay between requests to eliminate error
You need to insert a delay between requests to the Google Map API to get rid of the message and get the API to respond. How you implement a delay depends upon the platform you're using.

Google Drive API - Permissions - Rate limit exceeded. User message: Sorry, you have exceeded your sharing quota

I've been programatically creating and sharing documents using the Google Drive API. Yesterday I started to receive this error message with every request to insert a permission:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"location" : "user.sharing",
"locationType" : "other",
"message" : "Rate limit exceeded. User message: \"Sorry, you have exceeded your sharing quota.\"",
"reason" : "userRateLimitExceeded"
} ],
"message" : "Rate limit exceeded. User message: \"Sorry, you have exceeded your sharing quota.\""
}
I can still programatically create documents, but the request to insert a permission always fails.
This is being done through a Service Account, the idea being that the Service Account would manage these documents for an application and share with authorized users as required.
The error started to occur after inserting somewhere around 50-100 permissions. I've done some research and it sounds like there may be a "feature" in the Google Drive API which limits the number of permissions that can be inserted. Is there some way around this limit?
Update:
For the record, I'm able to create exactly 51 permissions per day. Creating the 52nd permission always fails for a 24 hour period. Unfortunately this restriction renders the permissions API completely useless for Service Accounts.
As already stated by #zdegenr, I also experienced that you can only create about 50 permissions per 24 hours. I could solve this issue by disabling sending notification emails via the sendNotificationEmails parameter: https://developers.google.com/drive/v2/reference/permissions/insert .
With this configuration I don't hit the quota anymore...
Try https://www.google.com.ph/search?q=you+have+exceeded+your+sharing+quota&oq=you+have+exceeded+your+sharing+quota&aqs=chrome..69i57&sourceid=chrome&es_sm=93&ie=UTF-8 There are several suggestions in the results, including a mechanism to request support. It's one of either a rate limit error, in which case slow down, or it's a daily quota issue, in which case request a higher quota. Despite what the google docs say, if you're getting a rate limit, do not do exponential backoff as it will murder your throughput. Instead throttle your requests to around one every 3s, and then speed up or slow down until they go away.
Here is an implementation is .NET
var permissionsBody = new Google.Apis.Drive.v3.Data.Permission()
{
Type = "user",
Role = "reader",
EmailAddress = "emailAddress",
};
var permission = _service.Permissions.Create(permissionsBody, fileId);
permission.SendNotificationEmail = false;
permission.Execute();
You are probably hitting a quota per second limit. You can only make so many requests at one time. Implement Exponential Backoff, so that when you fail requests, you will give it a little time before re-trying. It should reduce the amount of rate limit errors you see.

Google apps script Error "UrlFetch failed because too much traffic is being sent to the specified URL."

I can not find anything about this error. The script worked earlier today and I need to run it daily to load files into salesforce. Is this a google limit, and how do i get past it?
See quota limits here (click on quota tab).
See the first two daily limits on UrlFetch towards the bottom.
To preserve the fidelity of the system for all users, there are some published limits on how much UrlFetch can be invoked by a single user/script.