> For the complete documentation index, see [llms.txt](https://aican.gitbook.io/aican/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aican.gitbook.io/aican/getting-started/integrations/telegram.md).

# Telegram

## 简介

完成 Telegram 串接后，即可在 AICAN Pro 后台统一接收及回复来自 Telegram 私聊或群组的访客消息，无需切换至 Telegram。

完成串接后，还可搭配聊天机器人、回聊及群发消息等功能，建立完整的客服流程，提升客服处理效率。

***

## 准备工作

开始串接前，请先准备以下资料：

* Telegram 账号。
* 一个 Telegram Bot（可创建新的 Bot，或使用现有 Bot）。
* Telegram Bot Token。

{% hint style="warning" %}

#### **提醒**

Bot Token 为 Telegram Bot 的授权凭证，请妥善保管，避免泄露给他人。
{% endhint %}

***

## 操作说明

{% stepper %}
{% step %}

### 步骤一：创建 Telegram Bot

若您尚未创建 Telegram Bot，请依照以下步骤操作：

1. 在 Telegram 中开启 [**@BotFather**](https://t.me/BotFather)。
2. 输入 `/start`。
3. 输入 `/newbot`。
4. 依照画面提示设置机器人名称及用户名。
5. 创建完成后，复制 **Bot Token**。

<figure><img src="/files/M1IhkHQPMTbcFAb9U4hm" alt=""><figcaption></figcaption></figure>

#### 使用现有 Telegram Bot

若您已经拥有 Telegram Bot，可直接使用现有 Bot，无需重新创建。

操作步骤：

1. 在 Telegram 中开启 [**@BotFather**](https://t.me/BotFather)。
2. 输入 `/mybots`。
3. 选择要串接的 Bot。
4. 复制 **Bot Token**。

<figure><img src="/files/INIBWwa7xALwiUTlfRwd" alt=""><figcaption></figcaption></figure>

***

{% endstep %}

{% step %}

### 步骤二：启用群组消息接收

若您需要接收 Telegram 群组消息，请完成以下任一设置。

#### 方法一：关闭 Bot 隐私模式（建议）

1. 开启 [**@BotFather**](https://t.me/BotFather)。
2. 输入 `/setprivacy`。
3. 选择要串接的 Bot。
4. 选择 **Disable**，关闭隐私模式。

<figure><img src="/files/Xku5KWhPVYYm2vOfrGo6" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

#### **提醒**

若 Bot 已加入群组，关闭隐私模式后仍无法接收群组消息，请先将 Bot 移出群组，再重新加入。
{% endhint %}

***

#### 方法二：将 Bot 设为群组管理员

若您的使用场景需要管理群组权限，也可以将 Bot 设置为群组管理员。

若 Bot 加入多个群组，需分别在每个群组完成管理员设置。

**手机版**

1. 创建 Telegram 群组。
2. 将 Bot 加入群组。
3. 将 Bot 设置为**群组管理员**。

<figure><img src="/files/XaNFGmWLCgxVMKvc853G" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/iAi7y6J1RbfdKYQGEltO" alt=""><figcaption></figcaption></figure>

**电脑版**

1. 创建 Telegram 群组。
2. 将 Bot 加入群组。
3. 将 Bot 设置为**群组管理员**。

<figure><img src="/files/63ZiPiB1qwEGCRSG3oUn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/gAsWLFEFK8mN4HFiItDg" alt=""><figcaption></figcaption></figure>

***

{% endstep %}

{% step %}

### 步骤三：串接 AICAN Pro

完成 Telegram Bot 设置后，即可开始串接 AICAN Pro。

#### 复制 Bot Token

复制 Telegram Bot 的 **Bot Token**。

Bot Token 格式通常为：`数字:随机字符`

<figure><img src="/files/zcq8nZDNCEWN6mU8N0Qy" alt=""><figcaption></figcaption></figure>

#### 新增 Telegram 渠道

进入：

**AICAN Pro 后台 > 设置 > 渠道列表**

选择 **Telegram**，点击【新增渠道】。

将 Bot Token 填入 **Token** 栏位，确认填写无误后点击【确定】保存。

<figure><img src="/files/hylwPwczGCgZov1KhEk3" alt=""><figcaption></figcaption></figure>

完成设置后，Telegram 私聊或群组中的访客消息，即可同步至 AICAN Pro 后台，客服可直接接收及回复消息。

***

{% endstep %}

{% step %}

### 步骤四：发送群发消息

完成 Telegram 串接后，即可使用群发消息功能。

进入：

**AICAN Pro 后台 > 设置 > 群发消息**

点击【新增群发消息】，即可建立新的群发任务。

<figure><img src="/files/cRY3LGPRZlmP4Fy995WV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mhmxTa8i3whTEiIP7XBL" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## 常见问题

### Q1：Bot 已创建成功，但平台收不到访客消息

#### 可能原因一：访客尚未主动向 Bot 发送消息

Telegram 机制限制，Bot 无法主动向未互动过的用户发送消息。

**解决方式**

请访客先开启 Bot 对话，并发送任意一则消息（例如：Hi）。

***

#### 可能原因二：Bot 已加入群组，但未启用群组消息接收

Bot 默认可能无法接收群组中的所有消息。

**解决方式一（建议）**

关闭 Bot 的隐私模式（/setprivacy → Disable）。

**解决方式二**

将 Bot 设置为群组管理员。

{% hint style="warning" %}

#### **提醒**

* 若设置完成后仍无法接收群组消息，请先将 Bot 移出群组，再重新加入。
* 若群组仅作为客服使用，建议关闭 Bot 隐私模式，以接收完整的群组消息。
* 若为公开群组，请依实际需求设置 Bot 权限。
  {% endhint %}

***

### Q2：平台可以接收消息，但无法发送消息给访客

#### 可能原因一：Bot Token 错误或已失效

若输入错误或已重新生成 Bot Token，平台可能可以连接成功，但发送消息会失败。

**解决方式**

前往 [**@BotFather**](https://t.me/BotFather) 确认 Bot Token 是否正确。

若已重新生成 Bot Token，请同步更新 AICAN Pro 后台的 Telegram 渠道设置。

***

#### 可能原因二：访客已封锁 Bot

若访客封锁 Bot，Bot 将无法继续发送消息给该用户。

***

### Q3：群组或频道相关问题

#### 可能原因一：Bot 未设置为群组管理员

若 Bot 需要管理群组权限，建议将 Bot 设置为群组管理员，并开启所需权限。

***

#### 可能原因二：Bot 加入的是频道（Channel）

Telegram 频道主要用于消息发布，不适用于一般客服对话场景。

**建议**

客服场景建议使用：

* Bot 私聊
* Telegram 群组

***

### Q4：同一个 Bot Token 可以同时串接多个平台吗？

不建议使用同一个 Bot Token 串接多个系统平台，否则可能造成：

* 消息遗漏。
* Webhook 被覆盖。

**建议**

一个 Bot 对应一个系统平台；若需串接多个系统，请分别创建不同的 Telegram Bot。

***

#### 下一步

完成 Telegram 串接后，即可在 AICAN Pro 后台统一管理 Telegram 对话，并搭配聊天机器人、回聊及群发消息等功能使用。

您也可以继续完成 WhatsApp、Messenger 或 LINE 等第三方渠道串接。

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>WhatsApp</td><td><a href="/pages/9BnjgJR8vplUQo3kO1BG">/pages/9BnjgJR8vplUQo3kO1BG</a></td></tr><tr><td>Facebook Messenger</td><td><a href="/pages/bkyPZ17f2Re1t5QF9Cte">/pages/bkyPZ17f2Re1t5QF9Cte</a></td></tr><tr><td>LINE 官方账号</td><td><a href="/pages/D1wV0nRz9b8ytuRuqaG0">/pages/D1wV0nRz9b8ytuRuqaG0</a></td></tr></tbody></table>

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://aican.gitbook.io/aican/getting-started/integrations/telegram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
