Telegram CLI/BOT all implicit limits - api

I want to send OTP , first to Telegram with usual SMS fallback.
Therefore i have to detect read callback of OTP message from user only with telegram cli API, unfortunately(Telegram bots doesn't provide read ack. feature).
There is no any concrete info in Telegram.
Is there any limit related to telegram bot (and telegram cli) subscribers(contacts) count? Except report spam.
Also what is the limit with native telegram api sendMessage? Which density i have to keep to not banned? Also do i need more numbers or accounts for this?
I searched everywhere and can't find relevant numbers although there are some users with plenty number of accounts.
Thanks for help!
UPDATE
Limitations on bot like 30q/sec and etc. is explicit in FAQ. i have to know all other limitations, especially on CLI(max contacts, requests frequency limit). For example, i have to know is this number registered in telegram - This is possible only with cli.Therefore i don't want to abuse platform restrictions, cause of commercial cause. Glad to hear more official ways.

You can check out Bot FAQ:
If you're sending bulk notifications to multiple users, the API will
not allow more than 30 messages per second or so. Consider spreading
out notifications over large intervals of 8—12 hours for best results.
Also note that your bot will not be able to send more than 20 messages
per minute to the same group.

Related

How to connect two telegram bots between each other?

I'm new in telegram bots and I wanted that one bot sends messages to a chat and another bot reads the messages, filters it and sends filtered messages to me.
I read related articles here, but I haven't found any appropriate solution.
I read that it isn't possible to create transfering messages between two bots because one can't see messages from another.
But still I haven't found final answer here.
Can you help me, is it possible or not?
And if it's possible, how to connect one bot to another?
You can't do that or rather you're not allowed to. Because it will create an infinite loop between both the bots.
To avoid that Telegram bot has some restrictions.
It can't reach to someone unless they have messaged the bot previously. So, theoretically it is impossible.

Freshdesk: Automating 'score' emails

Background: I have little coding experience (not API savvy) and would preferably use an automation tool for this but hope for some guidance in the best way to complete the task. '
We need to send a 'response' (number of emails sent by an agent) score at least twice a day to agents so they can gauge their efficiency. As an alternative we can build up a dashboard to enable easy viewing of this information.
Question: How do I go about sending emails to each agents gmail account with the number of responses completed on Freshdesk that day? Can this be done with a Zapier connection to googlesheets and then forming a googlescript? Would it be easier to set up a live dashboard displaying all agents scores and if so how would you recommend doing this?
Sending emails would be tough given that most email clients (gmail, outlook, ...) have stricter rules on what lands in inbox to avoid spamming.
But you can build a dashboard in Freshdesk to show this information. The sdk has default support for most things you'd need.
Here's a blog post of a sample dashbaord app in Freshdesk: https://medium.com/freshworks-developer-blog/building-a-full-page-app-on-freshdesk-5ce17524277f

API Whatsapp to send messages from an external application

I want to implement Whatsapp
to send information from an external application. The idea is to use this
external application to send information throughout Whatsapp.
If you can help me about the terms and
conditions and if this query is possible to develop.
There is a way through which you can send WhatsApp message from your self created application. Use this link Chat API.
But it only provides 3 days trail period and after that you have to purchase it.
The process in that is, you have to register with your google account, then scan the QR code provided(which changes after every 45 seconds). and you are set to go, they will provide you the API for : PHP, Node.JS, Jquery, CURL.
One thing more you always have to keep your phone connected with the internet everytime.
Also I found a drawback in that, i.e. they also provide API to read messages, but it is too slow, as in my condition I can see my messages of yesterday but not of today.

How to get Telegram Bot statistics?

Does exists any way to get bot's statistics with API or with web interface or with BotFather? Or I must to collect statistics by processing updates from bot API?
ps. Currently I store statistics in Redis by processing updates from bot API, but I wish find better way.
As aleix said there is no official support. After several days of research I've found the solutions for all platform bots, including telegram:
Chatbase.com from Google
botanalytics.co (free + paid)
dashbot.io(free up to 10 M messages)
no, there is no official support from Telegram to do that. There are third party analytics like botan, you can get navigate via bot to your bots stats:
Botan.io (seems to be abandoned)
You can see an example here: analytics tool for your telegram Bot
They also have integration to track more data via website:
url-shortening
If it is your bot performance that you worry about and you bot is popular (~300 requests per min), Botfather will monitor the request/response rate and alert you if there is something wrong.
Check the Status alert section in Bot Intro.
no actually you cant! But the easiest way for getting statistics about the users is to save the chat_id to database or into simple txt file.
the best way for that is use php mysql function to insert each chat_id into 1 columns then send it to your chat_id ...!

Android GCM topic subscription limit

With the introduction of topics in android gcm I was evaluating this option to easen the work that should be done to mantain in sync our server with some subscriptions.
However I have read in the documentation that the use of topics is limited to 1 million subscriptions. Does this mean that you can't have more than one million users (with one or more topics) or that you can only have 1 million topics subscribed (for example 100.000 users subscribed to 10 topics each) ?
It's a limit on subscriptions in your app in total, across all topics created within your app.
You will get a TOO_MANY_SUBSCRIBERS error when the number of subscriptions per app exceeds the 1 million limit.
I think the limit has now been scrapped:
GCM topic messaging allows your app server to send a message to
multiple devices that have opted in to a particular topic. Based on
the publish/subscribe model, topic messaging supports unlimited
subscriptions per app.
https://developers.google.com/cloud-messaging/topic-messaging
You could try to work around this limit by using multiple SENDER_IDs when registering devices.
Since the 1 million subscriptions limit is enforced application-wide, I'm pretty sure that Google's way of tracking that is via the SENDER_ID.
And then, on the server-side, you'd have to issue multiple publish requests to GCM (each time with a different Server API Key, to support more than 1 million devices).
I'm going to test this theory out and let you know what I find. The worst-case scenario is that it is enforced via the application's package name (com.example.package), and then there is no elegant workaround.
Update: The limit has now been removed!
We’re now happy to announce that we’re allowing unlimited free topics for your app. This means app developers can place an unlimited number of devices within each topic and create an unlimited number of topics.
http://googledevelopers.blogspot.co.il/2015/12/google-cloud-messaging-weve-come-long.html?utm_source=Android+Weekly&utm_campaign=1cb848077c-Android_Weekly_184&utm_medium=email&utm_term=0_4eb677ad19-1cb848077c-337844217
GCM now removed the limit, check this: https://developers.google.com/cloud-messaging/topic-messaging
Also Firebase Cloud Messaging (FCM) the same. https://firebase.google.com/docs/cloud-messaging/android/topic-messaging
GCM topic messaging allows your app server to send a message to
multiple devices that have opted in to a particular topic. Based on
the publish/subscribe model, topic messaging supports unlimited
subscriptions per app. The app server sends messages with payloads up
to 2KB to the topic, and GCM handles the message routing and delivers
the message reliably to the right devices. For example, users of a
weather forecasting app could opt in to a "severe weather alerts"
topic and receive notifications of storms threatening specified areas.
Topic messaging supports unlimited topics and subscriptions for each app.
Check This
[FCM Notifications][1]https://firebase.google.com/docs/cloud-messaging/android/topic-messaging