# Telegram Bot 机器人注册教程

**宝塔站长群** [**https://TG.HostCLi.COM**](https://TG.HostCLi.COM)

{% content-ref url="/pages/1XLrXsxOoIZmy0fKcU5h" %}
[宝塔面板/云安全监控 - 如何配置Telegram告警通知](/telegram-bot/telegram-bot-notification.md)
{% endcontent-ref %}

Telegram Bot，就是运行在 Telegram 上的可交互的「机器人」，你可以给它发送指令让它完成操作或是实现一些功能（付钱、游戏等等），或者可以在 Channel 或 Group 中发送特定消息。

这是 [官方介绍](https://core.telegram.org/bots)。它的主要原理就是开发者通过调用 [Telegram Bot API](https://core.telegram.org/bots/api) 来实现接收指令、发消息以及实现各种功能。

### 注册 <a href="#register" id="register"></a>

1. 与 [@BotFather](https://t.me/BotFather) 对话，发送指令 `/start` 开始，`/newbot` 申请一个新的 Bot 账号。

<div align="left"><figure><img src="/files/84nsIXTsP5MZZl5bZj8E" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/dl1gusOn06wimG2sXoUk" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/efRuM2Mc0BvYJ8wv5Kap" alt="" width="375"><figcaption></figcaption></figure></div>

接着，BotFather 会要求你输入这个 Bot 的名字和 ID。

创建完成后，BotFather 会同时给你一个 Token，记住这个Token API，前面是数字，中间是冒号，后面是字符串。

![](/files/qkXIUkG9TLSYWuncO32B)<br>

接下来，[按照教程获需要发送通知到达的对话窗口ID](/telegram-bot/telegram-bot-notification.md#get-group-id)。

**宝塔站长群** [**https://TG.HostCLi.COM**](https://TG.HostCLi.COM)

End.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.hostcli.com/telegram-bot/register-new-telegram-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
