JENNIFER View Adapter for Sending EVENTs notifications to Telegram
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src/main/java/com/aries/telegram
.gitignore
README.md
pom.xml

README.md

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

telegram_chat_id_example

  • Alternatively, you can use the ChatIdHelper class located in the util 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:

  1. In JENNIFER Client, open the management area and Navigate to Extension and Notice > Adapter and Plugin
  2. Make sure the adapter tab is selected then click the [+Add] button
  3. Select [Event] from the classifications dropdown.
  4. Enter telegram as the adapter ID.
  5. Enter the path to the adapter JAR file.
  6. Enter the adapter class name com.aries.telegram.TelegramAdapter and save the settings.

telegram_adapter_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