Overview
An adapter to send JENNIFER EVENT notification to Telegram. You can also check the Slack Adapter
Requirements
To use this adapter you will need two things:
- Token
- Chat ID
Getting The Token and Chat ID
- Talk to the BotFather and use the /newbot command to create a new bot. The BotFather will give you a token. Keep It for later.
- Next you need the chat ID. To obtain the chat ID, first use your telegram client to send any message to your new bot.
- Then call the
getUpdates
methods in Telegram API by opening your browser and navigate to the following link. (Make sure to replace${TOKEN_HERE}
with your actual token)
https://api.telegram.org/bot{TOKEN_HERE}/getUpdates
- You should see response like follow. Make Note of the chat ID is you will need it
- Alternatively, you can use the
ChatIdHelper
class located in theutil
package. Run the main method of this class passing your token. - You should see response message like follow :
Chat ID is [452396036]
- If you did not see this response. Make sure that you already sent any message to your newly created bot, then try again.
Adapter Settings
Once you have your token and chat ID you can proceed with the adapter installation/configuration as follow:
The first step is to register the adapter:
- In JENNIFER Client, open the management area and Navigate to Extension and Notice > Adapter and Plugin
- Make sure the adapter tab is selected then click the [+Add] button
- Select [Event] from the classifications dropdown.
- Enter
telegram
as the adapter ID. - Enter the path to the adapter JAR file.
- Enter the adapter class name
com.aries.telegram.TelegramAdapter
and save the settings.
Options
The following table shows the required options for this adapter
Key | Required | Description | Example |
---|---|---|---|
token | YES | Set the token you obtained from the BotFather here | 0980943:ojasdasctlkjlkjasdlnasdnxcmv |
chat_id | YES | Set the chat ID here | 45623121 |
proxy_host | NO | If you are using proxy, use this option to set the Proxy Host IP | 10.10.2.2 |
proxy_port | NO | If you are using proxy, use this option to set the Proxy Port Number | 3128 |
Adapter Version
Different Adapter Version Support Different versions of the server
Adapter Version | JENNIFER Server Version |
---|---|
1.0.1 | JENNIFER version > 5.2.3 |
1.1.0 | JENNIFER version >= 5.4.0 |