https://github.com/aahnik/tg-login
A command-line tool to login into Telegram with user or bot accounts and generate session string.
https://github.com/aahnik/tg-login
aahnik login python3 telegram-bot telegram-bot-api telegram-login telethon
Last synced: 7 months ago
JSON representation
A command-line tool to login into Telegram with user or bot accounts and generate session string.
- Host: GitHub
- URL: https://github.com/aahnik/tg-login
- Owner: aahnik
- License: mit
- Created: 2021-04-22T13:15:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T15:01:19.000Z (over 1 year ago)
- Last Synced: 2025-05-20T11:07:02.588Z (8 months ago)
- Topics: aahnik, login, python3, telegram-bot, telegram-bot-api, telegram-login, telethon
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 54
- Watchers: 2
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tg-login
A command line tool to login into Telegram with user or bot accounts and generate session string.
## Installation
We recommend using [pipx](https://github.com/pypa/pipx) for install tg-login
```shell
pip install pipx # install pipx first
pipx install tg-login # for dependancy isolation
```
## Usage
```shell
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.
[](https://replit.com/@aahnik/tg-login)
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.