Skip to content

Login with a bot or user account

Aahnik Daw edited this page Oct 24, 2022 · 9 revisions

In Telegram, there are two types of accounts: Users and Bots. With tgcf you may use your own user account or a bot that you have created.

Read this if you are planning to use a bot account
  • You can create a bot from @BotFather
  • The bot must be added to the groups and channels (both source and destination)
  • The privacy mode of bots should be set to off. That means the bot should be allowed to listen to all messages in the channels/groups it is a member of. By default this setting is on, you have to turn privacy mode off from BotFather.

Generate Session String

Run Online

Click on the below button to run in a free repl.

https://replit.com/@aahnik/tg-login

  • The session string will not be printed on the screen. (for security purposes)
  • The session string will be securely saved in your Saved Messages (if you log in with your own user account).
  • The session string will be sent to you (if you log in with a bot account).
  • All sensitive user input in the repl is made invisible to ensure high security.

Run on your machine

  • Open your terminal in Mac/Windows/Linux/Android

  • Make sure you have python installed. If you don't have python:

    • for Linux/Mac, its generally already installed.
    • for windows, use WSL-2 (Windows-11 or above) to run Ubuntu
    • for android (termux) run pkg install python
  • Install tg-login by running pip install tg-login

  • Run tg-login

  • It will prompt you to enter your details, and then print your session string on the screen.

  • Copy the session string, and never share it with anyone.