Goran D
Goran D

Reputation: 51

telegram api send message to specific user

I create a bot, add that bot to my group and now I can send messages to group via api: https://api.telegram.org/bot' + token + '/sendMessage' + '?chat_id=' + chat_id + '&text=' + text

And that message is visible to everyone in a group. How can I send a message in a group that is visible only to a specific user (I have a user id)?

Upvotes: 3

Views: 5433

Answers (1)

Ali Padida
Ali Padida

Reputation: 1939

You cannot send a user specific message in a group. Still you have other options:

  • Send a link to the group and mention the user to start your bot with that link for their message
  • Send a message with inline button that would only work for that specific user. Then when the user clicks on that button, a callback alert appears with the message.

Upvotes: 3

Related Questions