Skip to content

A command-line tool to login into Telegram with user or bot accounts and generate session string.

License

Notifications You must be signed in to change notification settings

aahnik/tg-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tg-login

A command line tool to login into Telegram with user or bot accounts and generate session string.

Installation

We recommend using pipx for install tg-login

pip install pipx # install pipx first
pipx install tg-login # for dependancy isolation

Usage

Usage: tg-login [OPTIONS]

  A command line tool to login into Telegram with user or bot accounts.

Options:
  --API_ID INTEGER  API ID obtained from my.telegram.org  [env var: API_ID;
                    required]

  --API_HASH TEXT   API HASH obtained from my.telegram.org  [env var:
                    API_HASH; required]

  -v, --version     Show version and exit.
  --help            Show this message and exit.

Repl

You may run this tg-login online by using this repl.

run on repl

Note:

  • A python virtual environment is created before execution and deleted post execution.
  • All sensitive user input is hidden.
  • The session string is not printed on screen, but sent to user.