Back to Blog
December 21, 2025
GuardSSL Team

How to Set Up Telegram Bot Notifications for SSL Alerts

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:

  1. Bot Token — A secret key that authenticates your bot
  2. 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:

  • MySSLMonitorBot
  • GuardSSL_AlertsBot
  • ssl_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:

  1. Start a chat with your new bot (search for it by username and click "Start")
  2. Send any message to the bot (just say "hi")
  3. Open this URL in your browser, replacing YOUR_BOT_TOKEN with your actual token:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
  1. 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:

  1. Create a group or use an existing one
  2. Add your bot to the group (search for it and add as a member)
  3. Send a message in the group that mentions your bot (e.g., /start@YourBotUsername)
  4. Use the same getUpdates URL from Option A
  5. 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:

  1. Add your bot as an administrator of the channel (important!)
  2. Post any message in the channel
  3. Use the getUpdates URL
  4. 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:

  1. @RawDataBot — Start a chat with it, and it'll tell you your user ID
  2. @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:

  1. Go to your GuardSSL dashboard
  2. Navigate to SettingsNotification Settings
  3. Find the Telegram card and click Setup Channel
  4. Enter your Bot Token in the first field
  5. Enter your Chat ID in the second field
  6. 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:

  1. Go back to @BotFather
  2. Send /revoke
  3. Select your bot
  4. Get a new token and update it in GuardSSL

Deleting the Bot

If you no longer need the bot:

  1. Go to @BotFather
  2. Send /deletebot
  3. 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:

  1. Send a new message to your bot
  2. Refresh the getUpdates URL immediately after
  3. 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