Integrate Telegram Bot using Java

Hi Guys, A short and really useful blog on Telegram Bot.

Before writing ahead i want to say a big thank you to Telegram for providing such a rich API and flexibility to create our own bot.

Use Case

Official telegram site shows many use cases where bot is really useful.

Here i used telegram bot to test my services which is deployed in raspberry pi board and bot will work as adhoc between a raspberry pi and Mobile Device using which i am sending a different commands to device.


The sample java code which is used to register a bot with telegram server and echo to mobile device whatever you have sent to bot.


Use below snippet to download required dependency.

You just need to execute main method, that it and Your bot will start reacting.

Live Telegram Boot Screen

You need to create your bot and need to get token by talking with BotFather, you can talk to BotFather via TeleGram App by searching @BotFather. Refer for more.

Thanks Guys for reading. Happy Learning.

Share current post by copy:

Thanks, Yogesh P

Leave a Reply

Your email address will not be published. Required fields are marked *