Search code examples
pythontelethon

Is there any way to skip number request in telethon?


Every time if my session is invalid i got this output: "Please enter your phone (or bot token): " Is there anyway to pass it or ignore it?

I tried to edit telethon source code, but im bad at it))


Solution

  • So, for everyone who have the same problem

    client = TelegramClient(f"session", api_id, api_hash)
    client.connect()
    print(client)
    if client.is_user_authorized():
      print("VALID")
    else:
      print('NO VALID')
    

    Everything was much easier, than i thought