Skip to content

Instantly share code, notes, and snippets.

View YuniorGlez's full-sized avatar

Yunior González Santana YuniorGlez

View GitHub Profile
@YuniorGlez
YuniorGlez / 0.README.md
Last active December 3, 2022 02:03 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() or showDialogs() to get the list of contacts with ids or the 20 last conversations in the same order of the client view
  4. Run saveChat(userId) where userId is the id from step 3 (inside the [] )

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation