I’m using python’s pyrogram lib to login to multiple accounts
I need to create a function just to send verification code to account
and then read it from other user input ( not the default pyrogram login prompt )
when I use send_code it sends code and waits for user input from console and that what I don’t want it to do
I need simply a function that takes phone number as parameter and send confirmation code to it
and a function then to login with that confirmation code ( got from user input somewhere else , eg: from telegram message to a linked bot or ….
2
Answers
I found a way to do it but with Telethon :
this will login , gets confirmation code from specific function and then uses it to login , and store session file
Here’s how you can achieve that with
pyrogram
:For more info check the implementation of String Session Bot which implements
Pyrogram
as well asTelethon
, particularly this function.