How to use
- Login to https://web.telegram.org
- Copy-paste contents of
telegram-scripts.js
into JS console - Run
showContacts()
to get the list of contacts with ids - Run
saveChat(userId)
whereuserId
is the id from step 3
Process can take a while, check console for progress. Occasionall FLOOD_WAIT
errors are expected. Once done, browser will download the JSON file.
Motivation
Proposed solution requires no dependencies and works with any browser/OS.
telegram-history-dump has a dependency on telegram-cli which failed to work for me.
Anyone planning to use this for long chats, edit line 25
const LIMIT = 100000;
to be something a bit higher. I found that 100000 per year the chat had existed was enough, though this will depend loads on the volume.Edit: that's for a 2-person chat, multiply up again by the number of people over this.