What is rate limit of accessing Telegram bot APIs? - telegram

I read in the docs that bot can send:
30 messages/second to different chats
1 message per second to the same chat
20 messages per minute to the same group chat
but this is all about sending messages, what about other endpoints? more specifically getChatMembersCount method?
Thanks

I know it's been a long time, but there's a very good resource now - https://limits.tginfo.me/en. There's a Bots section there. Also if you have time you can send pull request to the github repository - https://github.com/tginfo/Telegram-Limits/

Related

Telegram Bots -- proper way to have the user to wait for an external API response?

My Telegram Bot will make 1-2 Http API requests to external API. I guess, it may take up to 1-2 minutes to receive an replies.
What's a proper way in Telegram Bots to let the user to wait in such cases? Should I simply send him a text "working.... wait...it may take 1 or several minutes" thus letting him wait and this will be it? Or is there a special way to handle this in Telegram Bots?

Limits for Telegram bot

We're trying to implement telegram bot as notification tool for high load system. We're afraid of limits and bans from telegram in case of such huge amount of messages.
In official doc and FAQ I found the information about limits such as 1 message per second or 30 messages per sec for bulk notifications.
So, have you ever tried to implement telegram bot for high load system and what restrictions did you find?
How many messages for how many users is possible to sent per 1 second (not bulk messsages, jjust personal notifications)
More info here https://core.telegram.org/bots/faq#broadcasting-to-users
Now we're on analysing stage and want to know all possible limits
I suggest you see this link
All Telegram limitations have been collected and categorized:
https://limits.tginfo.me/en

How to tag everyone in the chat by my telegram bot?

I need to tag everybody in chat where my bot added.
My bot writes: #all and it should tag everybody in the chat.
I don't see any Telegram API methods to get all users in specific chat. How should I resolve the problem?
There are various obstacles that don't let you mention everyone in a single message:
You can only have up to 50 mentions in each message. [1]
You cannot fetch a list of all members in a chat using a bot.
If you insist on doing this, you should use a database to collect information about the members of these chats, when they send messages. And afterward, you should send multiple messages to mention all of them 50 by 50.
If you want a simple way to notify all members, you can just pin a message.

Telegram bot: forward old messages

Is there any way to have a Telegram bot that forwards very old messages? Let's say that a bot has had access to a chat for 2 years, can it forward the first message it received in that chat?
From my understanding, the forwardMessage() function requires a message_id parameter which corresponds to the ID received by getUpdates(), which however only holds messages up to 24 hours prior to the call.
But maybe there is some other way?

Telegram bots read channel updates

As telegram bots reads groups updates, is there any way to read channel updates also?
At the moment, Telegram Bots API doesn't allow bots to receive messages in channels, so it is not possible to read them (unless you use a Telegram API one.
Update
Since November update, the api now supports channel post and edition updates.
for not your channel:
if the channel is public, you can scrape from html code with address : https://t.me/s/ChannelName/messageId
if the channel is private, nothing to do
for your channel:
you can create a dummy group, then request 'forwardMessage' to forward from channel to dummy group
Yes, you only have to add the bot to your channel.
This is a JSON RESPONSE
{"update_id":164442191,
"channel_post":{"message_id":1405,"chat":{"id":-1001066700541,"title":"Underworld'S Creatures","username":"IlSottobosco","type":"channel"},"date":1499299471,"reply_to_message":{"message_id":1403,"chat":{"id":-100106670231,"title":"Underworld'S Creatures","username":"IlSottobosco","type":"channel"},"date":1499298047,"text":"Test"}}

Resources