skip to Main Content

I’ve been using Telegram bot, and trying to get member list from group, but I don’t know which methods I have to use for it.

https://gram.js.org/beta/classes/TelegramClient.html#getParticipants
and I found this doc, but not sure how to use that.

2

Answers


  1. you can`t get the list of users of your channel via Bot API.

    But you can verify that ‘is user is member of your channel or not’

    https://api.telegram.org/botXXXXXXX/**getChatMember**?chat_id="*channel_id*"&user_id="*userId*"

    Login or Signup to reply.
  2. As mentioned above, You can’t get the list of users via Bot API.

    But possible by using MTProto API (Telegram client library). A python wrapper for this is Telethon!

    client.get_participants() 
    

    The above method in the library is going to help you to achieve this.

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