Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Giving us the power to handle wrong api_id/api_hash combinations #421
Comments
|
@DumbMahreeo Hi, for custom login flows you should not be using start/run, instead, you have to manually call each method in the right order as shown in this simple example https://nekobin.com/xakufarufu.py. Having said that, I tried the following minimal code while using a wrong id/hash combination and I get app = Client("testnum", test_mode=True)
app.connect()
app.send_code("xxxxxxxxxx") |


Checklist
Description
When we ask the user to manually insert the api_id and the api_hash, they may insert something wrong. The problem is that after that, we can't help the user to understand its mistake or to correct it. The programs gets stuck in an endless loop where it asks for the phone number, and it expect the user to just forcefully close it, when the number is not the problem. I would really like an option in the Client object to manually handle the error, maybe with a try-except. Something like manual_error_handling=True where if some data is wrong it raises an error and we are free to handle it. I couldn't find a solution to this problem, but if it already exist, I apologize for my lack of attention and would like to be redirected to it. Right now I'm still searching for a solution.