This script retrieves the list of members from a specified Telegram group and saves the data in CSV format.
npm install
Copy the .env.example
file and rename it to .env
: cp .env.example .env
Set up your .env
file with the following variables:
# Create your app here: https://my.telegram.org/apps ; you'll get an API ID and an API hash
# Use incognito mode and disable adblockers to avoid issues
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
# here's how to get your group id: https://neliosoftware.com/content/help/how-do-i-get-the-channel-id-in-telegram/
# don't forget the minus sign!
GROUP_ID=your_group_id
You can get your API ID and API Hash from the Telegram Developer portal. The Group ID is the ID of the Telegram group you want to extract members from.
node script.js
session.txt
) for future logins.participants.csv
.