Is there a way for a telegram bot to know who is the administrator of a channel?
One way to do this is to send a verification code to channel admin and ask the admin to confirm the code. I couldnt find any API that allows sending a message to channel admin, though.
I can authenticate a user account just by asking user to send a message to my bot, but is there a way to have a channel sending a message to a bot?
2
Answers
i think this is not required!
when you have
a1255412542_bot
and ask the user to add this bot as administrator, is it possible to a channel admin to add this bot as admin?!!you can:
ok
button on your bot,sendChatAction
for hidden test) to the channel and if successful, finished!You can get the list of admins of any channel using this method:
https://core.telegram.org/bots/api#getchatadministrators
Check the permissions of that user since it returns a json array of username of the admins and their permissions