JohnLemon
JohnLemon

Reputation: 157

Can't send message to some bot users in Telegram

I made the bot in telegram which accepts some requests from users. My bot should send notifications about changes of the request status. I do it separate from my script by sending get request. But some users can not get the notification message, because this error "{ "ok": false, "error_code": 403, "description": "Forbidden: bot was blocked by the user" }" The user didn't block the bot. The bot blocked itself for some reason. I can't understand how it happens. What is the reason of blocking bot by the user unconsciously? I want write the guid for user "how do not block bot", but I don't know the reason. How I can solve this issue?

Here's my request:

https://api.telegram.org/bot<bot_token>/sendMessage?chat_id=<chat_id>&text=<Your request status changed>&reply_markup={"inline_keyboard": [[{"text": "View", "callback_data": "<request_id>"}]]}

Upvotes: 2

Views: 16797

Answers (2)

leealex
leealex

Reputation: 1583

I had the same problem, revoking bot's token solved it.

Upvotes: 0

Sean Wei
Sean Wei

Reputation: 7975

Your bot is blocked by users yet, need to click RESTART to unblock bot.

You can try it yourself by click Stop Bot in menu.

Upvotes: 5

Related Questions