When my Telegram bot sends sendMessage to Telegram server it gets the error message:
{"ok":false,"error_code":400,"description":"Bad Request: message text is empty"}
The problem appeared this morning, before that my bot worked a whole year without errors. GetUpdates command works well as before. I use GET HTTP method to send commads:
https://api.telegram.org/bot<MyToken>/sendMessage
with UTF-8-encoded data attached:
{"chat_id":123456789,"text":"any text"}
Has anyone encountered this?
Also note that your bot will not be able to send more than 20 messages per minute to the same group.
It is only possible to send messages to users whom have already used /start on your bot. When they start your bot, you can find update. message.
Only the inline bot can edit message.
If the issue still persists, try to modify your curl request. For me adding header 'Content-Type: application/json'
and -d '{"chat_id":12309832,"text":"any text"}'
fixed issue
Another way to send a message by emulating a form :
curl -s -X POST https://api.telegram.org/bot{apitoken}/sendMessage \ -F chat_id='-1234567890' -F text='test message'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With