Setup Overview
Step 1: Create a Telegram Bot
- Open Telegram and search for @BotFather
- Start a conversation and send
/newbot - Choose a display name for your bot (e.g.,
My Panguard Security) - Choose a username ending in
bot(e.g.,my_panguard_bot) - BotFather will reply with a Bot Token in this format:
Step 2: Get Your Chat ID
Method A: Using @userinfobot (recommended)
- Search for @userinfobot in Telegram and start a conversation
- Send any message (e.g.,
/start) - It replies with your Chat ID (a numeric value like
123456789)
Method B: Using the Bot API
- Send any message to your newly created bot in Telegram
- Open this URL in your browser (replace
<YOUR_TOKEN>with your actual token):
- Find the Chat ID in the JSON response under
"chat":{"id": 123456789}
Step 3: Configure Panguard Chat
Interactive Setup
- Bot Token — paste the token from Step 1
- Chat ID — paste the Chat ID from Step 2
Non-Interactive Setup
Step 4: Test
Bot not responding
Bot not responding
You must send a message to your bot first. Telegram bots cannot initiate conversations with users they have never interacted with.
Wrong Chat ID
Wrong Chat ID
Use @userinfobot to verify your Chat ID. Group IDs are negative numbers (e.g.,
-1001234567890).Network issues
Network issues
Ensure your system can reach
api.telegram.org on port 443.Group Notifications (Optional)
To send notifications to a Telegram group instead of a direct message:- Create a Telegram group
- Add your bot to the group
- Send a message in the group
- Use the
getUpdatesAPI method to find the group Chat ID (group IDs are negative, e.g.,-1001234567890) - Use the group Chat ID when configuring Panguard Chat