How to Set Up Telegram Bot Notifications for SSL Alerts
Telegram is fast, lightweight, and available everywhere. If it's your messaging app of choice, setting up SSL alerts there is a no-brainer. In this guide, we'll walk through creating a Telegram bot and connecting it to GuardSSL.
How Telegram Bot Notifications Work
Unlike Slack or Discord webhooks, Telegram requires two pieces of information:
- Bot Token — A secret key that authenticates your bot
- Chat ID — The unique identifier for where messages should be sent
Don't worry, getting both is straightforward. Let's dive in.
Part 1: Creating Your Telegram Bot
Every Telegram bot starts with a conversation with @BotFather—Telegram's official bot for creating and managing bots.
Step 1: Find BotFather
Open Telegram and search for @BotFather in the search bar. Make sure you select the verified one with the blue checkmark.
Alternatively, just click this link: t.me/BotFather
Step 2: Start a New Bot
Send BotFather the /newbot command. It will ask you a couple of questions:
First: Choose a display name
This is what users see in their chat list. Something like "SSL Monitor" or "GuardSSL Alerts" works well.
Second: Choose a username
This must be unique across all of Telegram and must end with bot. For example:
MySSLMonitorBotGuardSSL_AlertsBotssl_checker_bot
If your first choice is taken, try adding numbers or underscores.
Step 3: Get Your Bot Token
Once you've chosen a valid username, BotFather will congratulate you and give you an HTTP API token. It looks something like this:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz1234567890
Save this token somewhere safe. You'll need it soon, and you should treat it like a password.
⚠️ Security Note: Never share your bot token publicly. Anyone with it can control your bot and send messages on its behalf.
Part 2: Getting Your Chat ID
The Chat ID tells GuardSSL where to send messages. The format differs depending on whether you want alerts in a private chat, group, or channel.
Option A: Private Chat (Just You)
If you want alerts sent directly to you:
- Start a chat with your new bot (search for it by username and click "Start")
- Send any message to the bot (just say "hi")
- Open this URL in your browser, replacing
YOUR_BOT_TOKENwith your actual token:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Look for the
"chat":{"id":field in the JSON response. That number is your Chat ID.
For example, if you see "chat":{"id":987654321, your Chat ID is 987654321.
Option B: Group Chat
Want alerts in a team group? Here's how:
- Create a group or use an existing one
- Add your bot to the group (search for it and add as a member)
- Send a message in the group that mentions your bot (e.g.,
/start@YourBotUsername) - Use the same
getUpdatesURL from Option A - Find the group in the JSON response—look for a negative number like
-1001234567890
Group Chat IDs are always negative numbers. If you see something like -1001234567890, that's the format you're looking for.
Option C: Channel
For channels, the process is slightly different:
- Add your bot as an administrator of the channel (important!)
- Post any message in the channel
- Use the
getUpdatesURL - Find the channel's Chat ID in the response
Alternatively, if your channel has a public username (like @mychannel), you can just use @mychannel as the Chat ID in some cases, though numeric IDs are more reliable.
Easier Method: Use a Helper Bot
If the API route feels technical, you can use helper bots:
- @RawDataBot — Start a chat with it, and it'll tell you your user ID
- @getidsbot — Forward a message from any chat, and it'll tell you the chat ID
These bots are handy for quickly grabbing IDs without touching the API.
Part 3: Configure in GuardSSL
Now you have both pieces. Let's connect them:
- Go to your GuardSSL dashboard
- Navigate to Settings → Notification Settings
- Find the Telegram card and click Setup Channel
- Enter your Bot Token in the first field
- Enter your Chat ID in the second field
- Click Save
Hit Test Connection to verify. Within seconds, you should receive a test message in your chat.
What the Alerts Look Like
Telegram alerts from GuardSSL include:
- Domain name with expiration warning
- Days remaining until certificate expires
- Severity level (Info, Warning, or Critical)
- Timestamp
Messages are clean and easy to read—no cluttered formatting.
Managing Your Bot
Changing the Chat ID
Want to move alerts to a different chat? Just update the Chat ID in GuardSSL settings. No need to create a new bot.
Revoking the Bot Token
If you think your token has been compromised:
- Go back to @BotFather
- Send
/revoke - Select your bot
- Get a new token and update it in GuardSSL
Deleting the Bot
If you no longer need the bot:
- Go to @BotFather
- Send
/deletebot - Select the bot to delete
Common Issues
Bot not responding to /start?
Make sure you're messaging the correct bot. Double-check the username you created.
Can't find Chat ID in getUpdates?
The getUpdates endpoint only shows recent activity. If it's empty:
- Send a new message to your bot
- Refresh the
getUpdatesURL immediately after - Look for the new message in the response
Group Chat ID not working?
Ensure:
- The bot is actually in the group
- Someone has sent a message after the bot was added
- You're using the correct format (negative number for groups)
Messages not arriving?
- Verify the bot token is correct (no extra spaces)
- Check that the Chat ID matches where you want messages
- Ensure you haven't blocked the bot
Wrapping Up
Telegram bots are a powerful way to get instant SSL alerts on your phone or desktop—wherever Telegram runs. Once set up, you'll never miss an expiring certificate again.
Ready for more notification options? Check out our guides for Slack, Discord, and Feishu.
Haven't added any domains yet? Start monitoring now and let GuardSSL watch your certificates 24/7.
Check Your SSL Certificate Now
Want to see these certificate details for your own website? Use our free SSL checker to instantly analyze your certificate's security, validity, and configuration.
No registration required • Instant results • 100% free