Telegram Connect

In this topic, we will cover how to connect to a Telegram account to capture signals from a channel or group. To connect to Telegram, you will need two pieces of information: API ID and API HASH.


How to get Telegram ID and HASH?

  • To get this information, it is very simple. Access the official Telegram website at the following address:

https://my.telegram.org/

  • When you access the address above, you will see a login screen asking for your phone number.

  • Add phone number with country code. You can see the full list of codes at https://countrycode.org/. Don't forget to add the + before the country code.

  • After adding your number, Telegram will send a message with a code. Add this "Confirmation code" in the indicator field and you will be in the Telegram management panel.

  • Click on "API development tools". If you have not yet generated the information, do as follows:

  • In APP NAME add any name you want, e.g. KitBot. In APP SHORT NAME add the same name as the field above, however, without spaces or accents, ex kitbot.

  • In the Website field add https://kitbot.net

  • In the Platform field, select Desktop.

After this click on CREATE and your information will be generated.

After generating the information, copy the API ID and API HASH and add it to the KitBot bot in the indicated fields.

In the same bot window, you will be asked again for your phone number, including the country code. Add the information and click connect.

From here onwards, the following situations will occur.

  • Telegram will send you a code, via SMS or message in the Telegram app itself. You copy this code and add it to the bot in the indicated field.

  • If you have set a password on Telegram. You will be asked to add the security password and if you have not set a password you will be logged in.

How to configure available chats?

After authenticating, you will be directed to the main Telegram function screen. If everything went well with the connection, you will see the groups and channels you participate in.

To connect to a chat, you need to follow the steps below:

  • Click on the chat you want to connect.
  • Add a keyword that only appears in the signal confirmation message.
  • If there are messages similar to the confirmation message, you can add rejection words so the bot ignores the unwanted messages.
  • In the reading type, you will have three options. Immediately, Always Schedule and End of Current Minute.
  • Enter immediately, means that as soon as Telegram receives the message, it will be executed immediately in the bot.
  • Always Schedule, means that the bot will receive the Telegram message but leave it scheduled (in the scheduling tab) and execute it later (according to the time in the message).
  • End of Current Minute, means that the order will be received and as soon as the current minute ends it will be executed.
  • Using the Action buttons, you can Start/Restart a chat, Test a configuration, Stop and Remove a room.

After starting the chat, you will be able to see it in the Active Chats tab. Remembering that for any action on the initiated chat, you must go to the Active Chats tab and click on the chat you want to change.

On the right side of the window, you will see if the settings you made took effect during your test.