I have made an actions on google app for sending notifications during an event.The problem is sometimes the post request to send notifications is not completed and error 429 is shown as status code. Why is it happening? What if I want to send notification to a 1000 users at once. How should I do it? Can someone please help me? I need the solution as fast as possible. Any help would be highly appreciated.
HTTP 429 error is "Too many requests". This error typically occurs when you make too many API requests at a given time, exceeding quota.
If you are running into quota issues, you may want to update your notification logic to queue each request with a short delay.
You may also want to read the Best practices and limits documentation for push notifications.
Up to 10 notifications per user per day.
Up to 1 notification per user per minute.
Related
We are using the Google Calendar API to keep a sync between our app and events in our users' google calendar.
We have started regularly getting rate limiting errors (403).
However our usage according the APIs and Services page of the google cloud console is well below the stated limits (10,000 queries per minute and 600 per user per minute). We are also using the batch API to send our requests so cannot implement exponential backoff
Anyone got any advice on avoiding these rate limiting errors?
Rate limiting errors with google are basically flood protection you are going to fast. Dont hold to much stock in what the status shows on the Google developer console the numbers in those graphs are guesstimates at best and they are not Realtime.
The main cause for rate limit is that when you send a request there is no way of know which server your request is going to be run on. There is also no way of knowing what other requests are being run on the same server. So your request may run faster or slower than you would expect sometimes which makes it hard to track down exactly what 10,000 queries per minute and 600 per user per minute actually is.
10000 requests run on an overloaded server may run in 2 minutes while on a server that is not being overloaded it could be run in 30 seconds meaning the next request you send will blow out the quota.
As there is really no way of avoiding it you you should just ensure that your application is capable of responding to it by sending the request again. I wrote an article a number of years ago about how i would track my requests locally in my application and then ensured that it kept things at the right speed flood buster
Really as long as your application responds by sending the request again you should be ok.
I am developing an app locally and I just integrated the Youtube data api v3 to query videos.
Last night I received the 403 error that said my daily quota has been exceeded. If I look at the chart under quotas in the developer console, it says there was 10,000 requests yesterday. This is totally impossible as I am only using this locally.
Here is the quota chart
If I click on credentials in the left hand menu and select the API key page, it says only 309 requests for that API key in the last 30 days. That is the only API key I have activated. It can't be API theft, as it only says 309 requests for that key.
I am totally confused. What is happening here? Is there a way to see the IP address where these requests are originating from?
Those 2 stats are different from each other. 1 request could have a quota cost of one to over a hundred. That quota cost reflects to the queries per day stat. So it's not surprising for you to hit 10,000 with 300 requests.
To get around this issue, you may need to optimize your API request to retrieve only the resource that you need. If the default quota (10,000) isn't really enough, then you probably need to request for quota increase through the console or through this direct apply for higher quota link.
Complete info can be found in the youtube documentation
You can check how to calculate on link
I created an app a year ago and verified all needed webhooks.
December 14th 2016, some webhooks became unverified, despite of the fact that they were created and valided a year ago. I looked into Podio's status page, nothing happened that day.
I'm the only administrator of the target app and nothing changed since I created the app.
I wrote to support, but the given answer was not helpful.
Anyone had this weird issue or an explaination?
Hook might be un-validated if your service was too slow or down. Here is quote from https://developers.podio.com/doc/hooks
The hook must respond with a 2xx status code. If the status code is
different from 2xx more than 50 consecutive times the hook will return
to being unverified and will have to be verified again to be active.
Additionally, your hook may return to unverified if you do not send
responses in a timely manner. You should handle any heavy processing
asynchronously.
We're using notification_key to group multiple devices. Since yesterday we're unable to send a message to a notification_key. The GCM endpoint returns with status 200 but the response body is empty. The GCM diagnostics inside Google Play shows that no message has been sent to the device and we additionally checked that the message does not arrive at the device.
However, sending a message to a single registration_id (one of which is managed by notification_key) works as expected.
We haven't touched the GCM related code on our side and it was working as expected the days before. I would like to know if this error is known and if other apps are affected as well. Also happy to hear from Google if they were any changes in the last few days.
The issue has been resolved by Google. This is the answer I got from the Google Group thread I've created for this issue:
Hi Andreas,
We had a recent issue in the send API, affecting a subset of the
notification_key requests. That issue should be fixed now.
Please try again. If the API is still not working for you please
report back using:
https://support.google.com/code/contact/gcm_dev_support
Thanks,
- Diego
I'm using Yammer developer REST API. I want to get a notification, when someone hashtagged me in their post. I went through REST API documentation, but couldn't figure out which API operation can be used for this. Can someone help me to figure that out please? Thanks in advance.
EDIT:
It seems I can retrieve notifications using GET Notifications operation, and filter required events. What I want to know is if there's a way to get an event-trigger fired (basically a push message) when I'm hashtagged.
Unfortunately, there's currently no way to get a notification when you are mentioned in a message. Those messages just end up in your inbox.
It's not a great answer, but you could poll the inbox on some interval with these REST API calls:
GET /api/v1/messages/inbox
GET /api/v1/messages/inbox?newer_than=[:message_id]
where :message_id is the highest id of the messages you have received.
Keep in mind that you don't want to poll too often or you'll hit the rate limit.