🔧 How to Run on Termux
- Install Python & pip:
pkg install python -y
- Install Telethon:
pip install telethon
- Save the script as stringgen.py and run:
python stringgen.py
-
Enter your API ID, API Hash (from my.telegram.org), and your phone number.
-
You’ll get a string session printed in the terminal. Copy and keep it safe.
✅ Notes
This script uses Telethon because it’s lightweight and reliable.
Your string session is essentially a permanent login — treat it like a password.
For debugging: If you get AuthKeyUnregisteredError, make sure your phone number is correct and linked to the API ID/Hash.