I use a telegram bot in my site to send messages to channel.
This was working fine but suddenly 2 days ago when I’d send a message ,it returns “chat not found ! “
My published source in host has not changed in 2 month ago but this problem accrued !
Do someone know about this problem ? I live in Iran, is it problem telegram server block Iranian server ?
Using telegram.bot
api in c#
3
Answers
I've found answer here in this link :
How to obtain the chat_id of a private Telegram channel?
We should use id of channel.
Send message to this channel through Bot API
https://api.telegram.org/bot111:222/sendMessage?chat_id=@channelName&text=123 As response you will get info with chat_id of your channel.
Now you can convert Channel back to private (by deleting channel's link) and send message directly to this chat_id "-1001005582487"
Check if the id of the channel is right, check if the bot is still admin in the channel and if so check bot’s permissions.
In the new version of bot api, admins of channels have different types of permissions.
creator of the channel should make sure(in his app) that if the bot has the required permissions. (In this case “can send message”)