<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eli</title>
    <description>The latest articles on DEV Community by Eli (@mastrosgeppettos).</description>
    <link>https://dev.to/mastrosgeppettos</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4032814%2Faea077b8-e462-40bf-8970-779bf0ccfe1c.jpg</url>
      <title>DEV Community: Eli</title>
      <link>https://dev.to/mastrosgeppettos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mastrosgeppettos"/>
    <language>en</language>
    <item>
      <title>Getting a Telegram group's members and media into files you can actually use</title>
      <dc:creator>Eli</dc:creator>
      <pubDate>Thu, 16 Jul 2026 22:18:17 +0000</pubDate>
      <link>https://dev.to/mastrosgeppettos/getting-a-telegram-groups-members-and-media-into-files-you-can-actually-use-266a</link>
      <guid>https://dev.to/mastrosgeppettos/getting-a-telegram-groups-members-and-media-into-files-you-can-actually-use-266a</guid>
      <description>&lt;p&gt;There is a particular kind of annoyance that hits when you need Telegram data in a hurry. You are in a group with a few thousand people, or a channel full of photos, and you want a member list or all the media in a folder. Telegram will let you have it, eventually, but the path is not obvious and the built in tools are shaped for backups, not for the small targeted export you actually want.&lt;/p&gt;

&lt;p&gt;I have done this enough times that I have a mental decision tree now. This post is that tree, focused on the two things people ask for most: a clean list of who is in a group, and the media out of a chat or channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know what "have access to" means
&lt;/h2&gt;

&lt;p&gt;Before anything, the rule that governs all of this: you can export what your own account can already see. Members of a group you are in, messages in chats you are part of, media in channels you follow. You cannot conjure participant lists that a channel hides, or pull from places you have not joined. Any tool promising otherwise is selling you a ban risk. Keep exports to data you legitimately have in front of you, and keep the downstream use lawful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the member list
&lt;/h2&gt;

&lt;p&gt;Say you run a 5,000 person community and you want a roster with usernames and ids, maybe to cross reference against your CRM or just to see who is actually active.&lt;/p&gt;

&lt;p&gt;The Telegram Desktop export (Settings, Advanced, Export Telegram data) is the official path, but it is built for a full account archive. You get a big JSON or an HTML dump, and carving one group's members out of it is more work than it should be.&lt;/p&gt;

&lt;p&gt;The faster path is to read the participant list directly. Telegram exposes it through the client API, so anything speaking MTProto can page through participants and hand you name, username, id, and role. If you write code, GramJS or Telethon will do it in a dozen lines. If you do not want to write code, a browser extension that connects with your own API credentials will do the same paging for you and drop a file at the end.&lt;/p&gt;

&lt;p&gt;Whichever way you go, the output you want looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"user_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;204817&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ana_growth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ana"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"user_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;512044&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dvd"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Davide"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"member"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSONL like that is my default for anything over a few hundred rows, because it streams cleanly into scripts and databases. CSV is nicer if a non technical teammate is going to open it in Sheets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the media
&lt;/h2&gt;

&lt;p&gt;Media is where the manual approach really falls apart. Right clicking and saving four hundred photos is not a plan. You want the whole set, with each file still tied to the message it came from, so a picture is not just IMG_0421.jpg with no context.&lt;/p&gt;

&lt;p&gt;Two things make bulk media painless:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Preserve the reference.&lt;/strong&gt; A good export keeps sender, timestamp, and source chat next to each downloaded file, so you can rebuild who posted what.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Respect the rate limits.&lt;/strong&gt; Telegram throttles hard, and hitting it triggers a FLOOD_WAIT that pauses you for a set number of seconds. Any serious downloader needs backoff built in, or you will spend the afternoon babysitting errors.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Web mode versus API mode
&lt;/h2&gt;

&lt;p&gt;If you use a browser tool for either of the above, you will usually see two modes, and it is worth understanding the difference because it decides what you can pull.&lt;/p&gt;

&lt;p&gt;Web mode reads what Telegram Web has already rendered in the page. Zero setup, good for the messages in an open chat and your recent contacts. It is limited to what is on screen, same as the WhatsApp side of things.&lt;/p&gt;

&lt;p&gt;API mode (sometimes called power mode) uses your own api_id and api_hash from my.telegram.org to talk to Telegram over MTProto. This is what unlocks full member lists, mutual groups, and bulk media, because it is not limited to the rendered DOM. Your credentials stay local to your machine. This is the mode you want for the two tasks above.&lt;/p&gt;

&lt;p&gt;The extension I reach for when I do not feel like scripting is &lt;a href="https://www.mastros.online/telegram-scraper" rel="noopener noreferrer"&gt;Mastros&lt;/a&gt;. Being straight with you: it is a commercial product with a free tier, not an open library, so if you want to read or self host the code, GramJS is the honest recommendation instead. What the extension saves you is the plumbing: paging participants, FLOOD_WAIT backoff, keeping media matched to messages, and writing it all out as CSV, JSON, or JSONL. One quota detail if you try it: each media file counts as one message against the monthly allowance, so a big channel archive adds up quicker than a text only export.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Need one group's members: page the participant list over the API, either with GramJS or a no-code tool, and export JSONL or CSV.&lt;/li&gt;
&lt;li&gt;Need the media: use an API mode downloader that keeps each file tied to its message and handles rate limits for you.&lt;/li&gt;
&lt;li&gt;Need a full account backup and nothing targeted: Telegram Desktop export is genuinely fine.&lt;/li&gt;
&lt;li&gt;Grab your api_id and api_hash from my.telegram.org first if you are going the API route, and keep your exports to data you actually have access to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the no-code route fits, the Telegram exporter is here: &lt;a href="https://www.mastros.online/telegram-scraper" rel="noopener noreferrer"&gt;https://www.mastros.online/telegram-scraper&lt;/a&gt;. I wrote up the WhatsApp equivalent in a separate post, since WhatsApp gives you a lot less to work with.&lt;/p&gt;

</description>
      <category>telegram</category>
      <category>productivity</category>
      <category>data</category>
      <category>chrome</category>
    </item>
    <item>
      <title>How to export WhatsApp Web group members and chats to CSV (without the API)</title>
      <dc:creator>Eli</dc:creator>
      <pubDate>Thu, 16 Jul 2026 22:14:19 +0000</pubDate>
      <link>https://dev.to/mastrosgeppettos/how-to-export-whatsapp-web-group-members-and-chats-to-csv-without-the-api-39mb</link>
      <guid>https://dev.to/mastrosgeppettos/how-to-export-whatsapp-web-group-members-and-chats-to-csv-without-the-api-39mb</guid>
      <description>&lt;p&gt;WhatsApp is great at holding your data hostage. There is no "export group members" button, no "download my contacts" option, and the one export it does give you (Export chat) spits out a plain text file for a single conversation. If you run a community, do recruiting, or use WhatsApp as an informal CRM, you have probably hit this wall and ended up copy pasting names into a spreadsheet at 1am.&lt;/p&gt;

&lt;p&gt;I want to walk through what you can actually pull out of WhatsApp Web, what you cannot, and the different ways to get it into a CSV or JSON file you can work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, set expectations: you can only export what you can see
&lt;/h2&gt;

&lt;p&gt;This part matters, because a lot of "WhatsApp scraper" tools online promise things that are not real. You cannot export:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Phone numbers that WhatsApp hides from you&lt;/li&gt;
&lt;li&gt;Deleted messages&lt;/li&gt;
&lt;li&gt;Chats or groups you are not a member of&lt;/li&gt;
&lt;li&gt;A full history without scrolling to load it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What you &lt;em&gt;can&lt;/em&gt; export is the data already rendered in WhatsApp Web:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Group members&lt;/strong&gt;: display name, phone number when the group shows it, admin or member role&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loaded messages&lt;/strong&gt; from an open chat: text, sender when shown, timestamps, forwarded and reply markers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recent contacts&lt;/strong&gt; from your chat list: names, last message preview, unread counts, numbers when visible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a tool claims more than that, it is either lying or doing something that will get your account banned. Stick to visible, user initiated exports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Export chat (built in, very limited)
&lt;/h2&gt;

&lt;p&gt;Open a chat, tap the menu, choose Export chat. You get a &lt;code&gt;.txt&lt;/code&gt; file of that one conversation, optionally with media. It is fine for archiving a single chat, useless for member lists, and not structured, so you will be writing regex to parse it if you want it in a table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: The WhatsApp Business API (overkill for most people)
&lt;/h2&gt;

&lt;p&gt;If you are a business with real volume, the Cloud API is the "correct" answer. It is also a project: you need a Meta developer account, a verified business, a phone number dedicated to the API, and you have to write code against it. For "I just need this group's members in a spreadsheet," it is wildly disproportionate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: Read what is on screen with a browser extension
&lt;/h2&gt;

&lt;p&gt;This is the pragmatic middle ground. WhatsApp Web renders the member list, the chat, and your recent conversations in the DOM. A browser extension can read that rendered data and hand you a clean file, entirely on your machine.&lt;/p&gt;

&lt;p&gt;I have been using a Chrome extension called &lt;a href="https://www.mastros.online/whatsapp-scraper" rel="noopener noreferrer"&gt;Mastros&lt;/a&gt; for this. It is a commercial tool with a free tier, and the reason I reach for it is that everything runs client side. It does not phone home with your contacts, which is the bare minimum I want from anything touching a messaging app. Full disclosure so nobody feels tricked: it is a paid product, though the free tier covers small jobs.&lt;/p&gt;

&lt;p&gt;The workflow is boring in a good way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the extension and open &lt;code&gt;web.whatsapp.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A sidebar shows up with three modes: Group Members, Current Chat Messages, Recent Contacts&lt;/li&gt;
&lt;li&gt;Open the group or chat you care about, scroll once to load the members or messages you want&lt;/li&gt;
&lt;li&gt;Pick a format and export&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You get CSV for spreadsheets, JSON for feeding another system, or JSONL if the export is large and you want to stream it line by line. Group members and contacts count as "profiles," messages count as "messages," which is worth knowing if you are on a plan with monthly limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete example
&lt;/h2&gt;

&lt;p&gt;Say you manage a 400 person community group and want a roster. Open the group, tap the subject to open the member list, scroll to the bottom so all 400 render, then run the Group Members export. You end up with something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name,phone,role,source_group,exported_at
Giulia,+39 347 ...,admin,Founders Circle,2026-07-16T14:22:00Z
Marco,+39 348 ...,member,Founders Circle,2026-07-16T14:22:00Z
Studio Alfa,+39 076 ...,member,Founders Circle,2026-07-16T14:22:00Z
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Numbers only appear where WhatsApp itself shows them. For contacts already saved in your phone, you often see names but not numbers, which is expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips that save you time
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scroll before you export.&lt;/strong&gt; The extension can only read what has rendered, so load the members or messages first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use JSONL for big pulls.&lt;/strong&gt; CSV is friendlier for humans, but line delimited JSON is nicer when you are piping into a database or a script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deduplicate later.&lt;/strong&gt; If you export the same group twice or overlap contacts, clean it in your spreadsheet or with a quick &lt;code&gt;sort -u&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Respect the humans in the file.&lt;/strong&gt; Exporting a group roster is not a license to cold blast everyone. Depending on where you and your contacts live, GDPR and similar laws apply, and consent matters. Use exports for record keeping, migration, and analysis, not spam.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So which one should you use
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One chat to archive: built in Export chat is fine.&lt;/li&gt;
&lt;li&gt;Serious business volume with engineering time: the Cloud API.&lt;/li&gt;
&lt;li&gt;"I need this group or chat list in a spreadsheet, today, without writing code": a local browser extension is the least painful path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The theme across all of them is the same. WhatsApp will not hand you a clean export, so you either parse a text dump, build against an API, or read what is already on your screen. Pick the one that matches how much time you have.&lt;/p&gt;

&lt;p&gt;If you want to poke at the extension route, the WhatsApp exporter I mentioned lives here: &lt;a href="https://www.mastros.online/whatsapp-scraper" rel="noopener noreferrer"&gt;https://www.mastros.online/whatsapp-scraper&lt;/a&gt;. There is a Telegram version too, which I will cover in a separate post because Telegram plays by very different rules.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>chrome</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
