A Kafka Connect source for Telegram
The Telegram connect plugin needs a bot to communicate with.
Currently you must use and create your own bot, e.g. the KafkaConnectBot
using the BotFather
/newbot
command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot.
name
of your bot is displ§ayed in contact details and elsewhere.username
is a short name, to be used in mentions and telegram.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username must end in ‘bot’, e.g. KafkaConnectBot
.token
is a string along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw
that is required to authorize the bot and send requests to the Bot API./setuserpic
in the BotFather
followed by the name of the bot, e.g. @KafkaConnectBot
and the logo./setjoingroups
in the BotFather
followed by the name of the bot, e.g. @KafkaConnectBot
and the logo and enable
joining.Burglar-alerts
@KafkaConnectBot
and choose Add to group
, select the Burglar-alerts
group./test
to the group; this should be sent to the bot as well, even in privacy modeXXtokenXX
by the actual token
curl https://api.telegram.org/botXXtokenXX/getUpdates
bot
must always be present—it's just XXtokenXX
that you need to replacechat":{"id":-999991234,"title":"Burglar-alerts","type":"group"
you can find the chat id, here -999991234curl -X POST -H "Content-Type: application/json" -d '{"chat_id":"-999991234", "text":"Hello world!"}' https://api.telegram.org/botXXtokenXX/sendMessage