# 如何串接

### <mark style="color:blue;">使用前提：</mark>

* 已經在 [MaiAgent 平台](https://admin.maiagent.ai/)上建立好一個 「Website」 的對話平台，
* 已經在 [LINE Developers](https://developers.line.biz/zh-hant/) 的 console 平台建立好一個 「Provider」 以及 「LINE Login」 的 channel

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

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

### <mark style="color:blue;">設定步驟：</mark>

1\. 在在 [LINE Developers](https://developers.line.biz/zh-hant/) 的 LINE Developers console 平台， LIFF detail 的頁面 「**LIFF app name**」 欄位為您的 **LIFF app** 命名。

**2. Size** 欄位選擇 **Full**

**3. Endpoint URL** 欄位

將對話平台的 「**公開訪問URL**」 複製到 「**Endpoint URL**」 欄位，加上「**/line-liff/」**

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

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

4\. **Scopes** 欄位選擇 **profile**

5\. **Add friend option** 欄位選擇 \*\*\*\*On (normal)

6\. 按下 頁面下方的「 Save」按鈕，再回到剛剛的 LIFF detail 頁面，此時您會看到 系統已產生一個 **LIFF ID，將該 ID 填入到** 「Endpoint URL」 欄位中網址「.../line-liff/」的後面，並按下「 **Update**」

7\. 最後到最上方，將此 **LIFF** <mark style="color:blue;">**Published**</mark>，即完成設定與上線。

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

### <mark style="color:blue;">開始使用！</mark>

1. 「**LIFF URL**」 就是這隻 **LIFF** 的連結網址。
2. LINE 的聊天室中點開 「**LIFF URL**」 連結的使用者（圖文選單）便會被導向到 Web Chat 頁面使用 AI 助理對話，MaiAgent 的後台就可以收到用戶、對話資訊。

<figure><img src="/files/QFbZvqKE5NP3OIwc0suQ" alt="" width="188"><figcaption></figcaption></figure>

<figure><img src="/files/f5LWDLTjvwOyi3iu17UC" alt="" width="188"><figcaption></figcaption></figure>

### <mark style="color:blue;">適用場景</mark>

建立在官方帳號的圖文選單連結、線上商店整合、會員系統串接、活動報名系統、客戶服務系統


---

# 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://docs.maiagent.ai/tech/lineliff/setting.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.
