skip to Main Content

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 ?

3

Answers


  1. 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).

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search