1
1
123 1232015-12-21 21:31:47
Messengers
123 123, 2015-12-21 21:31:47

How to send HTTP request message to user via Bot Telegram?

Hello. Help me figure out how to send a message via Telegram's HTTP request. Created a bot, got a Token.
View request:

https://api.telegram.org/bot<Token>/[email protected]&text=Hello

Mistake:
{"ok":false,"error_code":400,"description":"[Error]: Bad Request: channel not found"}

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Platon Fedorovich, 2016-04-09
@platon_fedorovich

The entry appears [email protected]to be incorrect. Here you need to specify a unique (digital) Chat ID. Sending messages to any Telegram login (outside a specific chat) is currently unavailable.
Where to get Chat ID? Just write any message to your bot and display the results using getUpdates() . You can make it even easier, for example, by adding similar functionality to your bot.

S
srvmymy, 2017-08-26
@srvmymy

chatID specify with a minus in front

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question