Download your Telegram messages.
Before working with Telegram’s API, you need to get your own API ID and hash:
- Follow this link and login with your phone number.
- Click under
API Development tools
. - A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
- Click on Create application at the end. Remember that your API hash is secret and Telegram won’t let you revoke it. Don’t post it anywhere!
- Create a
secrets.json
file inside the root of this project. This file will be read by the application, make sure it looks like this:
{
"id": "1234556789",
"hash": "8u23918eu1281dh912eh89sdadyas9dy89"
}
- Create a new virtual environment or make sure the one you're using satisfies the requirements:
# if you want to create a new environment (with conda)
conda create --name teleme --no-default-packages python=3.7 && pip install -r requirements.txt
# or maybe just
pip install -r requirements.txt
- You're good to go!
python downdall.py -h