How can I detect whether a user deletes the Telegram Bot chat?

Yoones Mehdian picture Yoones Mehdian · Feb 8, 2016 · Viewed 7.5k times · Source

Is it possible to check, via an API, whether somebody has deleted the Bot Chat in Telegram?

My test : Currently if a user deletes a chat, new messages will not stop sending to user.

Answer

ihoru picture ihoru · Feb 8, 2016

Nope. Only by getting error while sending user something.

Even calling sendChatAction method does not return error if user blocked the chat:

$ curl https://api.telegram.org/bot***/sendChatAction -d 'chat_id=7975895' -d "action=typing"
{"ok":true,"result":true}
$ curl https://api.telegram.org/bot***/sendMessage -d 'chat_id=81083738' -d "text=ololo"
{"ok":false,"error_code":403,"description":"[Error]: Bot was blocked by the user"}