5

I use Telegram API to send a message to a user with my bot. When the user sends me a message, that operation works but when I want to send a message to an user that haven't sent me any message to me before, then an error occurs (I have his user id):

{"ok":false,"error_code":400,"description":"Error: Bad Request: user not found"}

Is there a solution to solve this?

ricardopereira
  • 11,118
  • 5
  • 63
  • 81
Bojbaj
  • 472
  • 1
  • 6
  • 15

1 Answers1

6

Telegram bots cannot be a conversation initiators - they can write to user only after that user sends a message to bot first: https://core.telegram.org/bots#4-how-are-bots-different-from-humans

If this error appears in a group, first you need add this bot to that group.

retif
  • 1,495
  • 1
  • 22
  • 40