I'm trying to obtain all users of a telegram group, I see the method getChatAdministrators, but I think the API doesn't have a method for obtaining all members.
I'm using telegram-bot-api of nodejs
What you are trying to archive is currently not possible using the bot api. I'm not sure about the nodejs api, but the official bot api (which your implementation is likely to use) currently doesn't allow getting specific information about all members.
What you can do though, is query how many users are currently in a group, using getchatmemberscount. And if you have the user id of one of the groups members, you can get further information about that user with the getchatmember function.
With the Telegram API, you can control a "regular" user about how you would control a bot. It won't be apparent to any other users that your account is automated if you decide to use this API; in fact, the official telegram apps use it as their backend. However, you will need to sign up with your phone number just like you would with a regular account.
With this API, you can query all the chats the bot is in very easily using the getChats function. Then, you can query full chat info for a specific chat (including all users and their details) using getFullChat.
You can extract all the members of any given group or channel(you need to be an admin for channel) using telethon, you can use telethon for that, you can find it here :- https://github.com/LonamiWebs/Telethon
Telethon extracts all the members of an given group and saves it in a SQLite database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With