10

Is this possible to send message to phone number not @username using telegram bot?

If answer is No, I have to say I have telegram account without @username and several days ago I got message from a Bot, how this is possible?

Any advice will be helpful.

Saber Amani
  • 6,409
  • 12
  • 53
  • 88
  • 2
    It is NOT possible for a bot to send messages to a phone number. As far as I know, it is also NOT possible to send to a `@username`, unless it is a `@channel_username`. A bot sends messages by `user_id`. It can know your `user_id` only if you have send it a message first. If you have never talked to a bot, but find it send you a message, the only way I can think of that happening is through a group chat or channel. – Nick Lee Dec 21 '15 at 18:10

2 Answers2

4

its not possible send message to phone number or username. you can only send message by ID.

i almost try every thing.(group chat or channel) the only way, bot can send a message to the user is the user start the conversation.

Mohammad
  • 2,724
  • 6
  • 29
  • 55
  • What if user installed app but i only do have the username ? – Pooya Estakhri Mar 12 '17 at 19:53
  • it is possible, recently I received message directly on my telegram for confirmation of my phone number from a site! but i couldn't find how! – Foad Tahmasebi Mar 12 '18 at 22:29
  • dear @FoadTahmasebi. its not possible to send the message by phone number in telegram bot api. what you saw is the new feature called telegram login. its so simple. here you can read about that: https://telegram.org/blog/login – Mohammad Mar 13 '18 at 07:23
  • @David, thank you for your answer, I know what is telegram login for website. I'm sorry, maybe I shouldn't comment here, it's not a bot, it is sending a message directly from a phone number. If you want to test it, signup mql5.com and confirm your phone number by telegram in your profile section. – Foad Tahmasebi Mar 14 '18 at 07:58
  • Thanks for sharing dear @FoadTahmasebi. i check the website. they are using telegram api. its not bot api. – Mohammad Mar 14 '18 at 13:55
-5

i can send message in to telegram channel with:

https://api.telegram.org/bot"your token"/sendMessage?chat_id="your chat public link as @msg"&text=123

wold replaced "your token" with token and replaced "your chat public link as @msg" with chanel name

important: your bot must be as administrator of your chanel

  • This is not the target of the question at all. This send public message to all the members of the channel! – SaidbakR May 17 '20 at 23:05