Skip to content

Instantly share code, notes, and snippets.

@stek29
Last active May 1, 2026 01:48
Show Gist options
  • Select an option

  • Save stek29/8a7ac0e673818917525ec4031d77a713 to your computer and use it in GitHub Desktop.

Select an option

Save stek29/8a7ac0e673818917525ec4031d77a713 to your computer and use it in GitHub Desktop.
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soakes
Copy link
Copy Markdown

soakes commented Feb 5, 2026

Hey @soakes, that's amazing, thank you for sharing!

Just in case I'd like to clarify that I absolutely do not mind since this gist didn't state any license.

A minor suggestion is not to call the app "Telegram Desktop" since Telegram Desktop is the name of the cross-platform Qt app (named Telegram Lite in App Store for some reason) to avoid confusion — the native Telegram macOS app is different from Telegram Desktop.

Hi @stek29

Great catch!

Will rename it later today.

Any ideas what we shell call it?

In brew its just called telegram, in the app its just called the same.

image image image

Open to suggestions for app name and repo name.

I will also adjust the documentation to make sure its clear which version its for.

Update
I have just made some adjustments, see what you think.
https://github.com/soakes/telegram-message-exporter/pull/4/changes

@carmolim
Copy link
Copy Markdown

I cant find the .tempkeyEncrypted file inside my Telegram app folder:
image
don't know if i use the "correct" app.

@soakes
Copy link
Copy Markdown

soakes commented Apr 30, 2026

I cant find the .tempkeyEncrypted file inside my Telegram app folder: image don't know if i use the "correct" app.

Hi @carmolim,

I believe the App Store version stores its data in a different location.

image

For reference, I tested this using the Homebrew version of Telegram:

❯ brew list | grep telegram
telegram

Update

I have updated the README to make the setup and usage instructions clearer.

Hope that helps.

@carmolim
Copy link
Copy Markdown

carmolim commented May 1, 2026

I found it, I opened it on vscode and by mistake hit save CTRL + S on the wrong tab and messed up with the .tempkeyEncrypted file 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment