How to initiate very first message from telegram bot? Where a user never chatted/interacted with that bot

Hello All,

Greetings!! I am coming across a requirement where I need to initiate messages to user(s) without their first interaction(NOT even once they interacted with BOT I mean) they should receive messages send by my bot.

I have searched in forums here and on Stack overflow forums, what I got till now is once user initiates chat, we get chat id and we can initiate messages after that but how about if user never interacted to our bot and we want to send/initiate message from bot to user? Is it allowed? Not sure on this one, will be grateful if there is any guidance is provided.

Thanks & Regards,
Ravinder Singh

Maybe this will help

1 Like

Thanks @LosinIt for your reply, actually I had already gone through that link but it has condition that user has to send first message but in my case even user doesn't sends message to bot I should be able to send message to user(s).

Ravinder Singh

I don't remember how I did it but I do recall that I had to send a message from my phone first in order to get some piece of configuration information the bot needed. Before you ask, no I don't remember what I sent the message to but it couldn't have been another user because I've never used Telegram that way, sorry.

You need the chatid from the user. see visual studio code - How can I send a message to someone with my telegram bot using their Username - Stack Overflow

Think about it, if you could send messges to users that never had talked to you this would open it up to getting spammed left and right.


Thanks a TON @zenofmud for replying here. Yes, honestly I considered this scenario but then it came into my mind that lets take an example of whats app where many big firms(with their official accounts off course) send updates on whats app. Since I am doing this for my friend's company, how about if they get an official account to send updates to their customers?

OR if not how about if if we have mobile numbers of users(like banks, medical firms have and they send messages to us)?

Your guidance is highly appreciated here. Cheers.

R. Singh

You can have a private chat group that the company runs, set bot as admin, then all employees can join group. As they join the bot would have access to their chat id's. If the user does not have telegram send email/text with invite to join group.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.