I’m working on a Telegram bot project and I need it to start conversations by itself. Basically, I want the bot to send messages to users without waiting for them to send something first. This could be text messages, images, or any other message format that Telegram supports.
I’ve been searching through the documentation but I can’t seem to find clear information about whether this is even allowed or how to implement it. Is there a way to make a bot proactively reach out to users? I’m not sure if there are specific API methods for this or if there are restrictions that prevent bots from initiating contact.
Any guidance on this would be really helpful since this feature is pretty important for what I’m trying to build.
Yes, you can definitely send automated messages with Telegram bots - I’ve built several myself. However, there’s an important point that wasn’t clearly mentioned: users need to message your bot first before you can initiate contact. They have to send /start or any message to opt in. Once they do that, you can retrieve their chat_id and message them at any time using the standard API. I’ve implemented notification systems, daily reminders, and scheduled broadcasts with this approach. Just ensure you maintain a database of users who have opted in by messaging you first. This is a fundamental rule that prevents spam on Telegram.
for sure, but users gotta msg your bot first b4 it can reach out on its own. Once they do, grab their chat_id and u can send msgs using sendMessage anytime!
Here’s what you need to know about the limits. Telegram bots can’t just message random people - that’s spam. But once someone talks to your bot even once, you can save their chat ID and message them later without waiting for them to start the conversation. The catch? They have to reach out first. After that, you can use sendMessage, sendPhoto, and other methods to push content to anyone who’s interacted with your bot before. Just don’t go crazy with message frequency or sketchy content, or Telegram will block your bot.