skip to Main Content

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


  1. 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:

    1. ask the channel name,
    2. send a message to the channel to ensure that the bot is not the admin of the channel,
    3. ask the user to add your bot as admin immediately! then press ok button on your bot,
    4. then you send a text message (or sendChatAction for hidden test) to the channel and if successful, finished!
    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search