Configuring Telegram Bot in Telebot Manager
1 Managing and Configuring Telegram Bots in Telebot Manager
2 Adding Bot Configuration Step 1 - Create a Bot in Telegram
3 Adding Bot Configuration Step 2 - Configure the Telegram Bot in Telebot
Note: If you are connecting to Telegram through an HTTP proxy server, please configure the proxy settings in "Global Config" before setting up your Telegram Bot. Click here for detailed instructions.
1 Managing and Configuring Telegram Bots in Telebot Manager
After installing the Telebot plugin, you need to configure the Telegram Bot in Telebot Manager to send and receive Telegram messages.
You can add, delete, disable, or enable the Telegram Bot in the 'Bot Configuration' interface of Telebot Manager.
Note: After disabling or deleting the bot in Telebot Manager, Telebot will not be able to send or receive messages with this bot. However, it will not affect other applications from using this bot.
2 Adding Bot Configuration Step 1 - Create a Bot in Telegram
Before configuring the bot in Telebot, you need to create a Telegram Bot in Telegram first.
(1) Add "BotFather" as a contact in Telegram:
(2) Open the chat window with BotFather, type and send the command "/newbot":
(3) Set a name for your bot.
(4) Set a username for your bot, and the username must end with "bot."
(5) After sending the username, the bot will be created. Telegram will display the new bot's information on the interface.
Find "Use this token to access the HTTP API" and note down your Bot Token.
Note:Keep your token secure and store it safely, it can be used by anyone to control your bot.
For more information on creating a Telegram Bot, please visit the official Telegram documentation at https://core.telegram.org/bots#how-do-i-create-a-bot
3 Adding Bot Configuration Step 2 - Configure the Telegram Bot in Telebot
Once the Telegram Bot is created, configure your Telegram Bot information in Telebot Manager. You can configure multiple Telegram Bots in Telebot
In Telebot Manager, click "Bot Configuration" to open the Telegram Bot management interface.
In this list, click the "Add Bot Config" button to open the "Edit Bot Config" dialog box.
Edit Bot Config dialog box
In this dialog box:
Bot Token |
Enter the bot's Bot Token, then click the "Load Bot Info" button. The system will use the Bot Token you entered to retrieve the corresponding bot's information. Note: The Bot Token will be encrypted and stored in your SQLMessenger database. The Bot Token is only displayed once during input. It will not be shown again when you reopen this dialog. Please keep your Bot Token safe to prevent loss or leakage. |
Bot ID |
Display the Bot ID retrieved from Telegram (generated by the Telegram platform). |
Username |
Display the Bot Username retrieved from Telegram. |
Bot Name |
Display the Bot Name retrieved from Telegram. |
Automatically fetch messages and save to local database |
When this option is enabled, the system will automatically call Telegram's "getUpdates" API to retrieve messages received by this bot. Note: The fetched messages will be stored in a PostgreSQL database on your computer. You can process these messages using other tasks or configure Telebot to forward them to a specified email address. The bot can only retrieve messages sent directly to it. To receive messages from a group or channel, the bot must be added as an administrator in that group or channel. Telebot automatically updates the bot's update_id to prevent fetching duplicate messages from Telegram's platform.If other applications are using the same Bot Token to fetch messages, they may fail to retrieve new updates. For details, visit: https://core.telegram.org/bots/api#getupdates |
Polling Timeout |
Set the timeout duration for each polling attempt to fetch new messages. Default: 30 seconds. |
Trigger Task on Receive Message |
You can specify the name of a task to be executed when new messages are received. Telebot will run the specified task each time new messages are polled. |
Forward Received Messages to Email |
If email addresses are set in "Forward Received Messages to Email", Telebot will forward the newly received messages to the email addresses you specified. You can set multiple email addresses, separating them with ";". Note: This feature requires you to configure the email account for sending emails in "Email Accounts Manager" before it can be used. For more details, visit Email Account Management |
Enable send messages via this bot |
When this option is checked, you can use this bot to send Telegram messages to designated individuals or groups. |