Forums

how to skip Please enter your phone (or bot token)? user input when running django app

I am accessing telethon module in django app. This requires entering phone number by me when I click on a page. Is it possible to save the number so it can be used without prompting me. How else can i get rid of this error.

  File "/home/nightly/.virtualenvs/.my3.8virtualenv/lib/python3.8/site-packages/telethon/client/auth.py", line 22, in <lambda>
    phone: typing.Callable[[], str] = lambda: input('Please enter your phone (or bot token): '),
EOFError: EOF when reading a line

You need to check telethon documentation if you can authenticate non-interactively.