A Telegram Chat Bot Client written in c#

I thought i should share my latest little GitHub project. Yesterday i thought of doing a chat bot for one of my upcoming IOT projects and I decided to make a .Net Standard C# client that can be reused.

Now one day later i have a first version done. It can send messages to a given chat, receive updates (messages) for a bot and set up webhook url for where you want to receive automatic updates without polling.

So you can now easily send telegram messages with C#.

The project also consists of two example projects:

  • A .net core console application polling updates from the telegram bot api
  • A .net core web application setting webhook that receives updates and reply to the sender.

Test my Telegram bot client and webhook

If you wanna test my webhook that uses this code library you can talk to my bot http://t.me/ApiClientTestBot. The bot will just reply with the message you just sent to it.

GitHub repo

You can get the code or contribute at github: https://github.com/amattias/Telegram-Bot-API-Client

Example code from solution

Example code for setting up webhook

Example code receving webhook update and sending a replying message

Telegram Bot API documentaion

You will find Telegram bot api documentation at:


  1. Nice work!

    is it possible get callback_query update? Need i create a new method on controller to do this?

    best regards

Leave a comment

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