How can I access to a Telegram channel messages with a bot registered as channel admin?
I am trying to get all the messages from Telegram channel and display them in an ASP.NET webpage (c#)
I am able to get updates when new message sent directly to the bot:
var json = wc.DownloadString(" https://api.telegram.org/bot<token>/getUpdates");
but its not working for the channel.
unfortunately it's not possible yet.(they may come up with something in future) as admin you can just send messages to channel.
The only way until now is as follows:
- Your bot be added to the channel by its administrator.
- You set the bot's
privacy
todisabled
.
Step 1 helps your bot to join the channel so it see the messages.
Step 2 makes your bot listening to all messages of the channel.
来源:https://stackoverflow.com/questions/34526029/how-can-i-get-messages-from-a-telegram-channel-with-the-telegram-api