I choose heroku for use my simple python script that gets telegram messages and parses them. So when i start the script on heroku it asked for telegram number and confirmation code, but i cant to enter them because i started it by command: heroku ps:scale bot=1
and have no access to heroku terminal. Is there a solution to this problem?
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
3
Answers
You don’t need to enter code everytime, because once you logged in, it will create a session file. So use that session file.
I think you need to pass your session string in telethon
Official Docs
Process –
StringSession
Generate Session :
Save this printed session in environmental variables
Use the printed session :
By doing this you don’t need to generate session again and again