Skip to content
Alexey Nesterov edited this page Aug 3, 2017 · 4 revisions

Telegram Bots

Telegram allows you to have automated user accounts to talk to people like any human being. You need to write a program for bots to work. This library helps you to write your bot using .NET framework.

Create a bot

Start a chat with BotFather in Telegram app, or click here

Token

After talking to BotFather and creating your bot, you will receive a token. It is a string like this: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

user_id

Telegram assigns each user an integer as identifier. This is called user_id.

chat_id

In chat types: Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Long.

In mehods: Unique identifier for the target chat or username of the target channel (in the format @channelusername). Long or string.