> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/conversations/line.md).

# Integrate with Platform: LINE

## <mark style="color:blue;">Pre-Connection Checklist</mark>

* An "AI Assistant" has been created on the [MaiAgent platform](https://admin.maiagent.ai/)
* A "Provider" and a LINE Official Account have been created on the [LINE Developers](https://developers.line.biz/zh-hant/) console

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

## <mark style="color:blue;">Start Connection</mark>

### 1. Go to <https://manager.line.biz/> and select the official account you want to connect

Click MaiAgent Testing:

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

After clicking, you will enter the official account settings page:

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

### 2. Click Settings in the upper right corner

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

Then enter the following page and click Messaging API in the left menu:

<figure><img src="/files/7qBPmHVxyas2E40lzbnR" alt=""><figcaption></figcaption></figure>

### 3. Enable the Messaging API Service

a. Click <mark style="color:blue;">Enable Messaging API</mark>

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

b. Select the Provider you just created (if you haven't created one yet, you can still create a Provider on this page)

After selecting, click <mark style="color:blue;">Agree</mark>

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

c. Submit privacy policy documents (optional)

In the next step, you can enter the URL of your company's internal privacy policy documents. After completion, click "ok" to proceed to the final confirmation step.

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

{% hint style="danger" %}
Before clicking ok, please confirm that the connected Provider is correct. This action cannot be undone after clicking ok.
{% endhint %}

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

### 4. Obtain the <mark style="color:blue;">Channel ID</mark>, <mark style="color:blue;">Channel Secret</mark>, and <mark style="color:blue;">Channel Access Token</mark>

a. After clicking OK, you can obtain the <mark style="color:blue;">Channel ID</mark> and <mark style="color:blue;">Channel Secret</mark> for the Messaging API service:

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

b. Return to the [LINE Developers](https://developers.line.biz/console/) page to obtain the Channel Access Token

Enter the MaiAgent Provider you just created

<figure><img src="/files/2KmBmsKBzvr9wUxL5gwE" alt=""><figcaption></figcaption></figure>

c. Find the MaiAgent Testing Channel you just created and click to enter

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

d. Switch to the Messaging API page and scroll down to the Channel access token section

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

e. Issue and copy the <mark style="color:blue;">Channel access token</mark>

If you have not yet issued a <mark style="color:blue;">Channel access token</mark>, click <mark style="color:blue;">Issue</mark>:

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

Then you will get your <mark style="color:blue;">Channel access token</mark> and can copy it:

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

### 5. Go to MaiAgent Chat Platforms and select LINE

a. Click <mark style="color:blue;">Connect Chat Platform</mark> in the upper right corner

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

b. Select LINE as the connection platform

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

### 6. Enter the name, select the assistant, and paste the Channel ID, Channel Secret, and Channel Access Token you just obtained

* **Name:** The AI Assistant name you want to display on the website
* **AI Assistant:** Select the AI Assistant to connect
* **LINE Channel:** Enter your "Channel ID", "Channel Secret", and "Channel Access Token"

After completion, click the "Connect Chat Platform" button in the lower right corner, and the chat platform will be ready.

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

### 7. Obtain the Webhook URL

Go to Chat Platforms, select the LINE channel you just created, click Operations, and obtain the Webhook URL in the API section

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

### 8. Go to <https://manager.line.biz/>, click "Settings/Messaging API", and paste the Webhook URL you just obtained

<figure><img src="/files/85PhuM4WiCpD4afxX7B8" alt=""><figcaption></figcaption></figure>

### 9. Return to the Messaging API channel you just created at <https://developers.line.biz/console/> and configure the conversation settings

Click the <mark style="color:blue;">Edit</mark> button next to Auto-reply messages

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

Adjust the response settings as shown below

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

### **10. Verify the connection**

You can try adding your own LINE **AI Assistant** account and starting a conversation

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

If the conversation can be viewed in both <https://manager.line.biz/> and MaiAgent's All Conversations, the connection is successful!

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

## ⚠️ Important Notes

**Limitations**

* A LINE group can only have one AI Assistant added
* Adding a new AI Assistant will automatically remove the previous one


---

# 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://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/conversations/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.
