Install the following python lib:
pip install -r requirements.txt
Create API access account at:
More details here:
https://docs.telethon.dev/en/latest/basic/signing-in.html#signing-in
Edit the following lines in the code:
self.api_id = "your_api_id"
self.api_hash = "your_api_hash"
self.account_phone = "yhour_phone_number" # in the format of +97254....
In case you have 2FA on the telegram account, edit the following code:
await client.sign_in(password=r'your_2fa_password')
It will persist a session
object in /files
so in subsequent runs, you won't need the telegram password.