> 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/line.md).

# Line

## 简介

完成 LINE 官方帐号串接后，即可在 AICAN Pro 后台统一接收及回复来自 LINE 官方帐号的访客消息，无需切换至 LINE 官方帐号管理后台。

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

***

## 准备工作

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

* LINE 帐号。
* LINE 官方帐号（LINE Official Account）。
* LINE 官方帐号管理员权限。

若您尚未建立 LINE 官方帐号，请先完成注册后再进行后续设置。

***

## 操作说明

{% stepper %}
{% step %}

### 步骤一：登录 LINE Official Account Manager

前往 [**LINE Official Account Manager**](https://manager.line.biz/)，登录 LINE 帐号后进入管理后台。

若您是首次使用 LINE 官方帐号，请先完成官方帐号注册。

可参考 LINE官方注册文档 完成帐号创建：[点击链接](https://www.linebiz.com/jp-en/manual/OfficialAccountManager/new_account/?list=7171)

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

***

{% endstep %}

{% step %}

### 步骤二：启用 Messaging API

进入 [LINE Official Account Manager](https://manager.line.biz/) 后：

1. 点击【设置】。
2. 进入【Messaging API】。
3. 点击【启用 Messaging API】。

系统将自动跳转至 [**LINE Developers Console**](https://developers.line.biz/console/)。

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

***

{% endstep %}

{% step %}

### 步骤三：创建 Provider（服务提供者）

首次启用 Messaging API 时，请先创建 **Provider（服务提供者）**。

操作步骤：

1. 输入 Provider 名称（可填写公司名称或 LINE 官方帐号名称）。
2. 阅读并同意相关条款。
3. 隐私权政策及服务条款网址可留空，或依需求填写。
4. 确认帐号名称及 Provider 名称后完成创建。

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

***

{% endstep %}

{% step %}

### 步骤四：串接 AICAN Pro

完成 LINE 官方帐号设置后，即可开始串接 AICAN Pro。

#### 获取串接资料

进入 **LINE Developers Console > Messaging API**。

复制以下资料：

* Channel ID
* Channel Secret

***

#### 新增 LINE 渠道

进入：

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

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

将 **Channel ID** 与 **Channel Secret** 分别填入对应栏位，并完成保存。

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

***

{% endstep %}

{% step %}

### 步骤五：启用 Webhook

完成渠道设置后，请前往：

[**LINE Developers Console**](https://developers.line.biz/console/) **> Messaging API**

完成以下设置：

* 开启 **Use webhook**。

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

接着返回 **LINE Official Account Manager**，关闭官方帐号的自动欢迎消息及其他自动回复功能，避免与 AICAN Pro 同时发送消息。

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

> **提醒**
>
> 必须开启 **Use webhook**，否则 LINE 访客发送的消息将无法同步至 AICAN Pro 后台。

完成设置后，LINE 官方帐号收到的访客消息，即可同步至 AICAN Pro 后台，客服可直接接收及回复消息。

<figure><img src="/files/0xaBTxNcNRSqzicduFF2" alt=""><figcaption></figcaption></figure>

***

{% endstep %}

{% step %}

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

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

进入：

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

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

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

<figure><img src="/files/4mVfYkFce8rIMIbt2yAo" alt=""><figcaption></figcaption></figure>

***

{% endstep %}
{% endstepper %}

## 常见问题

### Q1：收不到访客消息

#### 可能原因：Webhook 未正确设置

请确认：

* 已开启 **Use webhook**。
* Webhook URL 设置正确。

修改完成后，请重新整理页面，确认 **Use webhook** 显示为已开启状态。

***

### Q2：平台显示发送成功，但访客收不到消息

#### 可能原因一：LINE 官方帐号已串接其他系统

LINE 官方帐号同一时间只能使用一个 Webhook。

若曾串接其他客服系统或机器人，可能导致当前平台无法正常接收消息。

**解决方式**

* 确认旧系统已停止使用。
* Webhook URL 仅保留 AICAN Pro 使用。

***

#### 可能原因二：Webhook 已被其他系统覆盖

若修改过其他系统设置，请重新确认目前的 Webhook URL 是否为 AICAN Pro。

***

### Q3：可以接收消息，但无法回复访客

#### 可能原因一：Messaging API 未启用

请前往：

**LINE Developers Console > Messaging API**

确认 Messaging API 已启用。

若未启用，将只能接收事件，无法发送消息。

***

#### 可能原因二：超过 LINE 消息发送额度

若超过 LINE 官方帐号当月可发送的消息额度，可能导致消息发送失败。

请确认目前帐号的消息额度是否已用完。

***

### Q4：其他常见问题

#### 群组或多人聊天室收不到消息

请确认已开启允许 Bot 加入群组的相关设置。

可前往对应 Channel 的 **Messaging API** 页面确认相关设置。

***

#### 图片、文件或贴图发送失败

LINE Messaging API 对消息类型、文件格式及文件大小有所限制。

建议先测试纯文字消息，确认发送正常后，再测试图片或文件。

***

#### 下一步

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

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

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Telegram</td><td><a href="/pages/uYWkiLfPCttRx7QoiQYC">/pages/uYWkiLfPCttRx7QoiQYC</a></td></tr><tr><td>Facebook Messenger</td><td></td></tr><tr><td>LINE 官方账号</td><td></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/line.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.
