I am trying to implement the verification of phone numbers in python, whether they are registered in the telegram base or not. The documentation says:

(auth.checkPhone "79123413132")

And where and how to send a request is not clear. If you can link via http, then it would be generally gorgeous.

    1 answer 1

    I share what I found on your question:

    $MadelineProto = new \danog\MadelineProto\API(); if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user $sentCode = $MadelineProto->phone_login($number); echo 'Enter the code you received: '; $code = ''; for ($x = 0; $x < $sentCode['type']['length']; $x++) { $code .= fgetc(STDIN); } $MadelineProto->complete_phone_login($code); } $auth_CheckedPhone = $MadelineProto->auth->checkPhone(['phone_number' => string, ]); 

    Found on github. Library for review: MadelineProto . Here it is on GitHub

    • Python tag is worth - Pavel Durmanov
    • @Alban You can visually look at the code indicated by me in the example, you can draw some conclusions and understand how and what works. I saw that in Python - Dmitry
    • python tag is not critical, any code can help - egorkh
    • @egorkh Have you seen the example? Happened? - Dmitry
    • I vote for, but to be honest, I have a jamb somewhere - egorkh