Sending notifications with Telegram BOT from Vigor Router

Telegram is a popular instant messaging (IM) service that allows users to exchange messages, share media and files, make private and group voice or video calls, and conduct public live broadcasts. Using IM services is becoming more and more popular in today's world. Following the trend, Vigor routers can also be configured to send notifications/alarms of network events through Telegram Bot, including VPN disconnected/ reconnected, WAN disconnected/ reconnected, and Web login/SSH login/ Configuration change events. All the current Vigor Router support sending notifications via Telegram. The complete list of supported events will be listed in the Notification Object and can be various depending on the model and firmware version.

Imagine that the Vigor router encounters an abnormal situation when the IT staff is not in the office during non-working hours. Users continue to try to create connections but fail due to the VPN being down or the server being interrupted due to WAN downtime. If the IT staff can receive warning messages from the Vigor router through Telegram on his phone, it will help to solve the problem rapidly and shorten the time it takes for the server to return online.

This article will guide you through the configuration steps to set this up in a Vigor router.

Step 1: Create a chatbot on Telegram
  • 1.1 Search for @BotFather and add it to your contacts.
  • @BotFather is a Bot used to create other Bots.

  • 1.2 Send a message /newbot to the Bot, which will lead to creating your bot for sending the notifications.
  • The token info will be used on the Vigor Router’s configuration later.

  • 1.3 Similarly, you can search for @userinfobot on Telegram and add it to your contacts.@userinfobot is a Bot you can ask for the Chat ID or user ID.
  • Send a message /start to the Bot, and he will reply with the Telegram Chat ID/User ID. The ID info will be used in the Vigor Router configuration.

    Step 2: Router Configuration

    2.1 Create a customized SMS provider profile

  • Go to Objects Setting >> SMS/Mail Service Object
  • Select a custom profile, can be index 9 or index 10
  • Enter the name of the Service Provider.
  • Enter the following API of the Telegram Bot. The token we got from Step 1.2 needs to be filled in the API without double quotes. https://api.telegram.org/bot”Your Bot Token”/sendMessage?chat_id=###txtDest###&text=###txtMsg###


    2.2 Send a Test message

    This will confirm if the Telegram Bot created can send the message correctly.

    Click Send a Test Message button.


    Enter the Telegram ID from step 1.3 as the cellphone number, then click OK. Vigor Router will send the test message to the Telegram ID.


    Then check the Telegram App on the phone and see if the test message is received.

    2.3 Create Notification Object

    Go to Objects Setting >> Notification Object, select an index, and configure the events that need the notification.


    2.4 Configure SMS/Mail Alert Service

    Go to Applications >> SMS/Mail Alert Service, check to Enable an index, select the SMS service provider we created for TelegramBot, the notification profile, and enter the Recipient Number. The Recipient Number is the network administrator's Telegram User Chat ID got from step 1.3.


    The network administrator will now receive the notification of Vigor Router on the Telegram App when the defined events happen.


    Published On:2023-04-14 

    Was this helpful?