To receive notifications in a Telegram chat we need to have 2 things:
- Bot Token: the unique token that identifies the bot and allows Shodan Monitor to post as the bot
- Chat ID: the unique ID that tells Shodan Monitor where to post the notification.
The first step is getting the chat_id
number of an existing channel or create a new one dedicated to receiving Shodan Monitor notifications.
- Open the Telegram app
- Click on New Message
- Select New Channel
- Enter a channel name (ex.
Shodan Monitor
) - Click the checkbox to create the new channel
- Post a test message to the channel. It doesn't matter what the message contains but we will forward it to another bot to get the channel ID.
- Start a chat with a bot such as @getidsbot
- Go back to your channel and forward the test message to the @getidsbot
- Look for the
id
in the Origin Chat section of the message that @getidsbot sends. The number should start with a-
.
The next step is to generate a bot and get the token
please follow the official instructions below:
https://core.telegram.org/bots/features#creating-a-new-bot
After creating the bot, make sure to invite it to the channel and give it permission to post messages. Finally, we get into Shodan Monitor to create the notifier:
- Click here to create the notifier in Shodan Monitor.
- Enter the
token
andchat_id
from the previous steps. - (optional) Provide a description (ex.
Telegram channel xyz
) - Select
Apply to existing asset groups
if you want to get notifications from all asset groups delivered to Telegram - Click on the Add Notifier button to save the settings
- Done! You've successfully connected Shodan Monitor and Telegram.