I am making REST API call to Viber back-end but intermittently I am getting 504 GATEWAY_TIMEOUT error.
Are there any limitations when we send multiple requests to Viber back-end at the same time?
Yes, they have limitations. See Broadcast Message section.
Maximum total JSON size of the request is 30kb. The maximum list
length is 300 receivers. The Broadcast API is used to send messages to
multiple recipients with a rate limit of 500 requests in a 10 seconds
window.
Related
We use Forge Data Management API to access project documents.
We execute next set of requests:
project/v1/hubs to get hubs (hubId)
project/v1/hubs/:hubId/projects to get projects (projectId and rootFolder)
data/v1/projects/:projectId/folders/:folderId/search?filter[fileType]=rvt,nwc,nwd to get files filtered by extension
On search we often get Too Many Requests status code.
We have about 20 files in the project.
Sometimes this request is processed instantly, sometimes 8 seconds, sometimes 20 seconds.
Response body:
{"jsonapi":{"version":"1.0"},"errors":[{"id":"GUID","status":"429","detail":"Too Many Requests"}]}
On this page we can see that there is a limit 300 requests/minute. But we get Too Many Requests status after exceeding not more that 10 requests/minute.
Also here we see that response must contain Retry-after header. But the is no such header.
So i have next questions:
What is the best practice to search project files by the file extension?
Why we get Too Many Requests even if we don't exceed the limit?
What should we do for not getting Too Many Requests status?
Why the is no Retry-after header in the Too Many Requests response?
We have desktop and mobile app (2 different client id) integrated with bim360 api. We have a problem with 429 error responses. Documentation: https://forge.autodesk.com/en/docs/data/v2/developers_guide/rate-limiting/ doesn't give us a lot of details.
How does it work? How can we avoid it?
What will happen if 1000 different users from apps with the same client_id at once try to get issues list? Will it be distinguish as Ddos? Are hubId, projectId, user account, ip address considered in rate-limiting algorithm?
As I know, each API has a well-configured rate-limit per minute per client id. After reaching the limit, you will see a retry-After parameter appears in the response header of each of your API call. It stands for the retry time when you can call the API again, and the unit of this value is in second. You can schedule a retry task along this retry time in your code.
Note. The value of the retry-After will reset if you make another call before reaching the Retry-After duration.
Hope it help, Cheers!
I'm currently using the Google Places API to pull reviews onto a webpage. Everything is working fine except for the Photos of the people leaving reviews. When trying to get the photo of the reviewer, it's returning a 403 Forbidden on every other page load. It seems that there might be a rate limit perhaps?
The problem is I can't find any documentation about rate limits and how to get the picture to display without issue. Am I missing something in the docs?
My API call is this;
https://maps.googleapis.com/maps/api/place/details/json?placeid=PLACE_ID&key=API_KEY
That returns quite a long JSON array (I've cut it down). One of those fields is;
{
"result" : {
"reviews" : [
{
"profile_photo_url" : "//lh5.googleusercontent.com/url/photo.jpg"
}
}
}
}
Like I said, if I refresh a couple of times it'll cause a 403 error for the images get request. Anyway to cache or allow more requests?
I found out why this was happening. It's to do with rate limits on the photo media which is why it was giving a 403 error in the console. The developer docs outline the limits for the media requested.
An excerpt of the docs...
The Google Places API Web Service enforces a default limit of 1,000
free requests per 24 hour period, calculated as the sum of client-side
and server-side requests. If your app exceeds the initial limit, the
app will start failing. You can increase this limit free of charge, up
to 150,000 requests per 24 hour period, by enabling billing on the
Google API Console to verify your identity. A credit card is required
for verification. We ask for your credit card purely to validate your
identity. Your card will not be charged for use of the Google Places
API Web Service.
Best thing to do is to cache the media once it's requested to avoid going over the limit which is especially useful if you're reloading the page lots of times for testing local development changes.
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.
In my application , I have used Vimeo API. Sometimes I get Rate Limit Exceed error.
My question is that:
Is it App specific?( requests made per app irrespective of any no. of devices that are using it)" OR
Is it device specific? Suppose two devices have this app and it is possible that one gets this error but the other does not).
In my case, if I made many requests of different kinds and this error occurred. Immediately I installed this app on another device. The other one also start getting this error.
It is app specific for unauthenticated calls if it crosses its daily limit. Like i was getting this error only when if i searched any videos but not when accessing my private videos. And for authenticated calls if you crosses its daily limit then it will be device specific. For more details: https://developer.vimeo.com/guidelines/rate-limiting