In Firebase Cloud Messaging, Messaging report, count of received messages is more then sent. Why it is so? - firebase-cloud-messaging

In Firebase Cloud Messaging, Messaging report, count of received messages is more then sent. Why it is so ?
I have checked data in Biq Query and it differs with diagram. In Big Query data count of received messages is less then sent.

firebaser here
That data is unusual since normally send count should be greater than received. It’ll be challenging to pinpoint or even narrow down what could be the problem on a public forum without going into project-specific details. The issue can be in the FCM backend itself or just in the reporting metrics. I would recommend reaching out to Firebase support as they can offer personalized help.

Related

Firebase Cloud Messaging sending messages one by one

I am developing an app where I want to send notifications to multiple users from my backend server. These notifications will contain 4 different contents, three of them will go to 3 different users, but the forth one will go to more than 1000 users, the frequency of theses messages will be 3 to 7 times a week. Is it ok to send this amount of messages one by one using the Cloud Messaging api? Or should I group the messages before sending?
I thought about creating a topic in the Cloud Messaging, and subscribe the users to it and then send a message, but I don't if it is correct to keep subscribing/unsubscribing users just to send one message.
NOTE: I've never used any push notifications service before.
The Firebase Cloud Messaging infrastructure delivers billions of messages per day. The volume you're describing sounds well within reason for it.
Without knowing more about the use-case it's hard to say whether using a topic would be a better approach, so I recommend reading the documentation on topic messages to get a better understanding for it.

Measure AWS SES usage per domain / Per client / Sub-account

I provide SES Services to many of my clients in different regions of the world. So their apps send out emails through my AWS SES account. It has become a problem to trace out how to measure their usage and stats, IAM wise or some other ways and then be able to bill them for what they have consumed. There must be a way to break stats into some kind of Sub Accounts or something
Can someone help regarding this ?
You have two options for such fine-grained monitoring, according to the official docs:
Feedback notifications
This option allows the most detailed reporting for your billing needs. However, it also requires more work on your part, because you need to build handlers (i.e. lambda functions) which will log sending/bounces/complaints in some persistence (i.e. DynamoDB table). More details here.
Event publishing
This option uses CloudWatch for persistence and you have the (probably) familiar CloudWatch UI for reporting. You will have to enforce (somehow) your clients to use a AWS specific SMTP header or SendEmail / SendRawEmail API calls. Less work on your part but you need to find a way to make your clients help you. More details here.

Inconsistent webhook delivery of Twitter Account Activity API

I have successfully set up a DM bot with the Account Activity API. Everything works very well, except that sometimes the message sent to the bot (through the Twitter's web interface or mobile application) doesn’t fire a webhook to my server. The messages could be quick replies responses or plain text.
The reason is obviously not a downtime of my server since I tried to make a conversation between 2 webhook registered users (so my server receive the webhooks for both users) and for the same message sent, I have successfully received the webhook of the sender (the user) but not for the recipient (the bot).
As the bot isn’t in production yet, the reason is not an overload of messages. There is currently only 2 users that make conversations. From my experience, around 10% of messages are "lost".
I'm using the free (sandbox) Account Activity API tier, but as I understand the only differences between the free and paid versions are a higher number of subscriptions (I'm fine with 15) and the “Retries” feature. Regarding this feature, it is specified that “The Account Activity API provides a retry feature when the client’s web app does not return a ‘success’ 200 response for an account activity webhook event.”
It clearly states that the event failure concerns the client’s side, not the Twitter side. Considering this issue (my server doesn't receive the webhook at all), there is no guarantee that every event will be delivered even if in a paid plan.
This is a big inconvenience for bots since a button can only be clicked once, so the user must retry the conversation from the beginning (besides the fact that the bot "doesn't work"...)
So my questions are :
Is anyone here experience this issue ?
Is this a “bug or a feature” of the free Account Activity API ? I mean, at random the free tier doesn't fire the webhook on purpose (even if it's not specified in the docs) ?
Is there a way to see or measure the webhook failures Twitter side, via the dashboard for instance ?
A guess is that the events could be more accurate if the account is verified (with a blue badge) or hit a followers number threshold ? The treatment could be different due to the potential surge of events, so they are monitored with more ressources, thus more reliable ?
I already create a topic in the official Twitter forum and there is at least one other person in the same case, but no official answer from Twitter so far.
Thanks a lot !
BR,
Simon
I've got an official answer from Twitter :
Unfortunately it is not possible to achieve 100% delivery rate when there is only 1 delivery attempt for an event, which is why we have retries (and even then, retries are not a guarantee either). Things can go wrong; maybe internal issues in Twitter Data Centers, routing issues in the internet, hosting issues at your webhook, etc.
So from the time being, it seems that there's not way to have a 100% success delivery when you build a bot on Twitter.
Full answer can be read here.

Send message to th all of bots users (telegram api)

how to send Send message to the all of bots users?
There is no way to sned message to all ?
what is the method name ?
From Official API FAQ:
How can I message all of my bot's subscribers at once?
Unfortunately, at this moment we don't have methods for sending bulk messages, e.g. notifications. We may add something along these lines in the future. (...)
Obviously, if you store users chat_id, you can send individual message to all users (I use this method).
Navid wants to send message to all subscribers via bot.
If subscribers are more than 100 persons bot will very slow to sending all messages and may doesn't send messages to all.
Navid's question was how we can send message without this problem?
you can send with curl_multi_exec
Currently, a developer would need to implement a special broadcasting function that would send the message to each active user at the time adding a small delay to avoid hitting the rate limit of 30 messages per second (see https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once). This would mean that a very popular bot with say 10K active users cannot give timely notification as the last user would get the message about 5 minutes after the first user.
Here is a feature request to ask to add a method in the Bot API to broadcast a message to all its active users at once. You can upvote this feature request. https://bugs.telegram.org/c/8463

Instagram API Error: Client request limit reached

I am getting this error whenever I try to follow someone on Instagram via API no matter how many follows have been done before:
{"meta":{"error_type":"APIError","code":400,"error_message":"Client request limit reached"}}
My app allows authenticated users to follow interesting people. I know that there is a 5000 call/hour limit per authenticated user, but it fails even with new users.
Do my app is reaching some kind of client level limit?
APIs like follow, unfollow, comment are limited to 350 requests per hour. However sending requests from client side will fix this problem to some extent but it allows the users to see your API token.
In this case it looks like it would be beneficial to get some more data from your users. You could use Google analytics to track the "follow" action
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
This would give you a timestamp and information about user behavior.
Even with an advertised rate of X requests per hour, one user hammering the service with your API key can cause everyone to get throttled. (Not guaranteed, but pretty common practice for companies to keep their services alive)
It might be a good idea to reset your API, its possible (though unlikely) that someone has acquired your key and is using it.