> 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/en/build/choose-channel/line.md).

# Connect a Conversation Platform: LINE

Connect a LINE Official Account: get the Channel ID, Channel Secret, and Channel Access Token, set the Webhook URL, and optionally open Web Chat inside LINE with LIFF.

## <mark style="color:blue;">Pre-Connection Checklist</mark> <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* 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="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-4c57afd0e778526737fc9ac2313136c151427ec5%2F%E6%88%AA%E5%9C%96%202025-04-23%20%E4%B8%8B%E5%8D%884.47.49.png?alt=media" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">Start Connection</mark> <a href="#start-integration" id="start-integration"></a>

### 1. Go to <https://manager.line.biz/> and select the official account you want to connect <a href="#step-select-line-official-account" id="step-select-line-official-account"></a>

Click MaiAgent Testing:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-b259661331628fb8d70751be73bf58b1ff1363e7%2F%E6%88%AA%E5%9C%96%202025-04-23%20%E4%B8%8B%E5%8D%885.01.45.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-9e55e5c3dc2374041854881b6719f3df3825b269%2Fimage%20(91).png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Click Settings in the upper right corner <a href="#step-open-settings" id="step-open-settings"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-4c7a72ffe65370366469f48c041f2e4779895d93%2Fimage%20(92).png?alt=media" alt=""><figcaption></figcaption></figure>

Then, on the following page, click Messaging API in the left menu:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-2a672d36efd55a0a903906ff3ec5d9c38fa3a2b3%2Fimage%20(94).png?alt=media" alt=""><figcaption></figcaption></figure>

### 3. Enable the Messaging API service <a href="#step-enable-messaging-api" id="step-enable-messaging-api"></a>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-e9cf1fba0bb93107e220ba5675f057ddadfec276%2Fimage%20(95).png?alt=media" 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="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-900971b42f688352ea2b8bbb5e032a4186cd7430%2Fimage%20(96).png?alt=media" alt=""><figcaption></figcaption></figure>

c. Enter a privacy policy and other documents (optional)

Next, you can enter the URLs of your company's privacy policy and other documents. When finished, click "OK" to go to the final confirmation step.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-9c5990ded93811136e85a654172838b736de6f41%2Fimage%20(97).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Before clicking OK, double-check that you have selected the correct Provider. It cannot be changed after you click OK.
{% endhint %}

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-2738e6eeda74375881863013c9b4dee8a4211d9a%2Fimage%20(98).png?alt=media" alt=""><figcaption></figcaption></figure>

### 4. Get 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 href="#step-get-channel-credentials" id="step-get-channel-credentials"></a>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-62036a0837be41377d35148d132fa177eae230b2%2Fimage%20(99).png?alt=media" alt=""><figcaption></figcaption></figure>

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

Open the MaiAgent Provider you just created

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-0ca678190a3fc0ccc0026d1d94e97aa7ac8c991d%2Fimage%20(100).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-6b8df2220047a11c45a07982d0f5b570b4245716%2Fimage%20(101).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-7c72c96f2bb978a7fdf9137fa491da3f05ac8f66%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-21%20113719.png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-262bfa573d9962d3818de76352aabb7475ce91dd%2Fimage%20(104).png?alt=media" alt=""><figcaption></figcaption></figure>

You can then copy and use your <mark style="color:blue;">Channel access token</mark>:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-df57c4306b08e8dc8a601e5311be6fd7ba285a1f%2Fimage%20(13).png?alt=media" alt=""><figcaption></figcaption></figure>

### 5. Go to your MaiAgent chat platforms and select LINE <a href="#step-select-line-in-maiagent" id="step-select-line-in-maiagent"></a>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-45051526831861d07352f6b1084732e923c9fa5b%2Fimage%20(102).png?alt=media" alt=""><figcaption></figcaption></figure>

b. Select LINE as the platform to connect

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-cb4498bb59b5516d1074ed0de41f6a5d03b07d41%2F%E6%88%AA%E5%9C%96%202025-05-07%20%E4%B8%8B%E5%8D%882.43.54.png?alt=media" alt=""><figcaption></figcaption></figure>

### 6. Enter a name, select an Agent, and paste the **Channel ID, Channel Secret, and** Channel Access Token you just obtained <a href="#step-fill-channel-credentials" id="step-fill-channel-credentials"></a>

The creation form has three tabs: <mark style="color:blue;">Basic Settings</mark>, <mark style="color:blue;">Feature Settings</mark>, and <mark style="color:blue;">Permission Settings</mark>. Fill in the following on <mark style="color:blue;">Basic Settings</mark>:

| Field                                                                                                 | Description                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">Name</mark>                                                                 | The name this chat platform displays in the admin console                                                                                                                                                                                                                                                                     |
| <mark style="color:blue;">AI Assistant</mark>                                                         | Select the Agent to connect (the one marked "Default" is the organization's default Agent)                                                                                                                                                                                                                                    |
| <mark style="color:blue;">LINE Channel</mark>                                                         | Paste the <mark style="color:blue;">Channel ID</mark>, <mark style="color:blue;">Channel Secret</mark>, and <mark style="color:blue;">Channel Access Token</mark> you just obtained                                                                                                                                           |
| <mark style="color:blue;">Chat Room Settings</mark> › Respond only when @mentioned in groups          | When on, the Agent responds only to messages that @mention it in LINE groups; when off, it responds to all messages in the group. See [Using in LINE Groups](#line-group)                                                                                                                                                     |
| <mark style="color:blue;">AI Assistant Thinking Animation</mark>                                      | On by default. After a user sends a message in a one-on-one chat, LINE immediately shows a loading animation until the Agent's reply is sent (up to 60 seconds). The screen notes that this feature only works in one-on-one chats and is not shown in groups. See [AI Assistant Thinking Animation](#line-loading-animation) |
| <mark style="color:blue;">Enable Reset Command</mark>, <mark style="color:blue;">Reset Command</mark> | When on, you can add one or more command texts (for example, "Start over"); when a user sends one of these texts in LINE, a new conversation is started for that user                                                                                                                                                         |

The <mark style="color:blue;">Feature Settings</mark> tab has <mark style="color:blue;">AI Interaction Features</mark> (Enable OCR) and <mark style="color:blue;">AI Awareness Settings</mark> (Answer using system time + time zone, Answer using sender name). For their meaning, see [Feature Settings](/maiagent-user-guide/en/build/conversation-settings/platform-settings/function-settings.md#messaging-platform-switches). On the <mark style="color:blue;">Permission Settings</mark> tab, choose which roles can see this platform; see [Chat Platform Settings Overview](/maiagent-user-guide/en/build/conversation-settings/platform-settings.md#tab-map). All of these can still be changed on the platform settings page after creation.

After filling in the credentials, you can first click <mark style="color:blue;">Test Connection</mark> to confirm that LINE accepts the credentials (a successful test shows "Connection successful"), then click the "<mark style="color:blue;">Connect Chat Platform</mark>" button in the lower right corner, and the chat platform is ready.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-44bf92a7f547e51f5f75fe14faf29cca9eabbbae%2Fline-create-form-loading-animation.png?alt=media" alt="The Basic Settings tab of the LINE creation form: Name, AI Assistant, Webhook reminder, the three LINE Channel credential fields; under Chat Room Settings, the group @mention switch is off, the AI Assistant Thinking Animation is on, and Enable Reset Command is off"><figcaption><p>When creating a LINE chat platform, the AI Assistant Thinking Animation is on by default</p></figcaption></figure>

#### AI Assistant Thinking Animation <a href="#line-loading-animation" id="line-loading-animation"></a>

This is the loading animation provided by LINE: after a user sends a message to the official account in a one-on-one chat, a loading animation first appears in the chat so the user knows the Agent is processing and does not think nothing is happening while waiting for a reply. The animation disappears when the Agent's reply is sent, and is shown for up to 60 seconds.

* **On by default**: It is on by default for newly created LINE chat platforms; existing LINE chat platforms have also been switched to on.
* **Shown only when the Agent replies automatically**: The animation is not shown when the conversation has been taken over by a human agent, automatic replies are turned off, or the current time is outside the automatic reply hours.
* **Not shown in groups**: LINE supports this animation only in one-on-one chats; groups and multi-person chat rooms are not affected.

If you do not want the animation, go to <mark style="color:blue;">Chat Platforms</mark>, open the LINE platform, turn off <mark style="color:blue;">AI Assistant Thinking Animation</mark> on the <mark style="color:blue;">Basic Settings</mark> tab, and click <mark style="color:blue;">Save</mark>.

### 7. Get the Webhook URL <a href="#step-get-webhook-url" id="step-get-webhook-url"></a>

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

### 8. At <https://manager.line.biz/>, click "Settings/Messaging API" and paste the Webhook URL you just obtained <a href="#step-set-webhook-url-in-line" id="step-set-webhook-url-in-line"></a>

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-eecf83c718171a6d06cac20257140ab7f41668e1%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-21%20122044.png?alt=media" alt=""><figcaption></figcaption></figure>

### 9. Adjust response settings: turn on Webhook and turn off auto-response messages <a href="#step-configure-messaging-api-channel" id="step-configure-messaging-api-channel"></a>

LINE Official Accounts have auto-response messages turned on by default. If you do not turn them off, LINE first replies with a default text when a user sends a message (for example, "Sorry, this account cannot reply to users' messages individually"). See [Receiving an Auto-Response Message from LINE](#line-auto-response).

Go to [LINE Official Account Manager](https://manager.line.biz/), click <mark style="color:blue;">Settings</mark> in the upper right, then click <mark style="color:blue;">Response settings</mark> on the left. You can also reach the same page from the <mark style="color:blue;">Messaging API</mark> tab of the channel in [LINE Developers](https://developers.line.biz/console/) by clicking <mark style="color:blue;">Edit</mark> next to Auto-reply messages.

Configure the settings as shown in the table below:

| Item                                                                                                                   | Setting                                                                                                                                                              | Description                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| <mark style="color:blue;">Webhook</mark>                                                                               | On                                                                                                                                                                   | When off, LINE does not forward messages to MaiAgent                                                                                 |
| <mark style="color:blue;">Auto-response messages</mark> (the switch when <mark style="color:blue;">Chat</mark> is off) | Off                                                                                                                                                                  | When on, LINE replies with a default text on its own                                                                                 |
| <mark style="color:blue;">Response method</mark> (the option when <mark style="color:blue;">Chat</mark> is on)         | Select <mark style="color:blue;">Manual chat</mark> for both <mark style="color:blue;">Response hours</mark> and <mark style="color:blue;">Non-response hours</mark> | If you select an option that includes "Auto-response messages", LINE replies on its own during that period                           |
| <mark style="color:blue;">Greeting message</mark>                                                                      | As needed                                                                                                                                                            | Sent by LINE when a user adds the account as a friend; the content is edited in the LINE admin console and is unrelated to the Agent |

<mark style="color:blue;">Chat</mark> can be either on or off when used with MaiAgent. When on, support staff can see conversations in the LINE admin console and reply manually, and the Agent still replies to the same message as usual.

{% hint style="warning" %}
When the <mark style="color:blue;">Response hours</mark> switch is on, the response method is split into two groups: "Response hours" and "Non-response hours". Select <mark style="color:blue;">Manual chat</mark> for both groups; if you change only the response hours, auto-response messages will still appear in the evenings and on holidays.
{% endhint %}

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-b0620ef7416611f019d89ca5676f4f2e981c63a8%2F%E6%88%AA%E5%9C%96%202025-04-23%20%E4%B8%8B%E5%8D%885.51.33.png?alt=media" alt="The Response settings page of LINE Official Account Manager: Chat, Greeting message, and Webhook are on, and the response method for Response hours is set to Manual chat"><figcaption><p>Settings when Chat is on: Webhook on and the response method set to Manual chat; scroll down to confirm that Non-response hours is also set to Manual chat</p></figcaption></figure>

### **10. Verify that the connection is successful** <a href="#step-verify-integration" id="step-verify-integration"></a>

You can try adding your own LINE Official Account as a friend and chatting with the Agent

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-d3f81c1c9b7e84203137e9f54aef019209f73860%2F%E6%88%AA%E5%9C%96%202025-04-23%20%E4%B8%8B%E5%8D%886.34.27.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-4d59bf9fc4fe7c1f8ac476d18bab8b515766f9dc%2F%E6%88%AA%E5%9C%96%202025-04-23%20%E4%B8%8B%E5%8D%886.43.12.png?alt=media" alt=""><figcaption></figcaption></figure>

## Open Web Chat inside LINE (LINE LIFF) <a href="#line-liff" id="line-liff"></a>

If you want users to open the web chat window directly inside LINE (for example, from a rich menu, carrying the LINE identity), you can embed Web Chat with LINE LIFF. This requires creating a LIFF App in LINE Developers and setting its URL. For the steps, see the technical manual's [LINE LIFF: What is LINE LIFF](https://docs.maiagent.ai/tech/serve/whatislineliff).

## Monthly Message Quota <a href="#line-monthly-quota" id="line-monthly-quota"></a>

A LINE Official Account has a monthly limit on the number of messages it can push (depending on the plan you purchased from LINE). Open the <mark style="color:blue;">Basic Settings</mark> tab of the LINE chat platform; the <mark style="color:blue;">Monthly Message Quota</mark> card at the top queries LINE in real time and shows the <mark style="color:blue;">Monthly Quota</mark>, <mark style="color:blue;">Used This Month</mark>, and <mark style="color:blue;">Remaining</mark> (plans with no limit show "Unlimited"). When the quota is used up, the card turns red with the warning "This month's LINE message quota has been used up": **during this period, neither AI nor human agent replies can reach LINE users**, and the corresponding messages on the conversation page are marked [Not delivered](/maiagent-user-guide/en/serve/daily-operations/reply.md#delivery-failed). Upgrade your plan in LINE Official Account Manager, or wait for the quota to reset next month.

For example, during an end-of-month promotion, an e-commerce customer service manager finds that some customers are complaining that they asked about their orders in LINE but received no reply. Checking <mark style="color:blue;">All Conversations</mark>, the Agent's replies show "Not delivered: This month's LINE message quota has been used up" beneath them. After confirming in the LINE chat platform's <mark style="color:blue;">Basic Settings</mark> that the monthly message quota is used up, the manager upgrades the plan in LINE Official Account Manager, and subsequent replies are sent normally.

## Message Format and Consecutive Messages <a href="#message-format-and-merging" id="message-format-and-merging"></a>

* **Markdown is automatically converted to plain text**: LINE does not render Markdown, so headings, bold/italic, links, tables, code, and other syntax in the Agent's replies are automatically converted to clean plain text before being sent to LINE (links become "text URL", and each table row becomes one bulleted line). You do not need to tell the Agent not to use Markdown in the role instructions. Text typed by human agents, Flex cards, and quick reply buttons are not affected. For details, see [Message Content Rendering Optimization: Messaging Channels](/maiagent-user-guide/en/build/choose-channel/web-chat/markdown-rendering.md#messaging-channels-plain-text)
* **Consecutive messages are merged into one turn**: When a user sends several images in a row in a one-on-one chat, or sends an image and then types text, the Agent waits for the whole series of messages to arrive and answers once (for messages containing only images or files, it answers about 4 seconds after the last message with no new messages, for at most about 20 seconds; it replies immediately when text is received; when multiple images are selected at once, it waits for the whole set to arrive), instead of replying to each image separately. Only one turn is processed at a time per conversation, and new messages that arrive before the previous turn finishes are queued behind it. Voice, stickers, videos, and locations are treated like text and answered immediately, and group conversations keep their original behavior

## Using in LINE Groups <a href="#line-group" id="line-group"></a>

After you add the official account to a LINE group, the Agent replies to every message in the group by default. To make the Agent reply only when addressed, go to <mark style="color:blue;">All Conversations</mark>, open the group conversation, and turn on the "Respond only when @mentioned in groups" switch above the input box. See [All Conversations](/maiagent-user-guide/en/serve/daily-operations/reply.md).

Once enabled, group members can address the Agent in two ways:

| Method      | How                                                                         | Description                                                                                                         |
| ----------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| @ mention   | Include "@official account display name" in the message                     | The name must exactly match the display name of the LINE Official Account                                           |
| Quote reply | Press LINE's "Reply" on a message the Agent previously sent, then type text | No separate @ is needed. When the LINE desktop app cannot @ an official account, this is the most convenient method |

Rules for quote replies:

* Only quoting a **message sent by the Agent** counts as addressing it; quoting other members' messages does not trigger a reply.
* Only **text messages** count as addressing it. Replying to an Agent message with a sticker does not trigger a reply and does not consume Credits.
* The Agent's replies in a group are attached as quotes beneath the question message, making it easy to tell who is being answered. If the reply is slow and exceeds the time LINE allows for an immediate reply, it is sent as a regular message without a quote.
* One-on-one chats are not affected by these rules: the Agent replies to every message, and replies do not include a quote.

## What to Check, in Order, When the Agent Does Not Reply <a href="#no-reply-checklist" id="no-reply-checklist"></a>

When a user sends a message in LINE but the Agent does not reply, first go to <mark style="color:blue;">All Conversations</mark> in MaiAgent to see whether the message arrived, then continue based on the result.

**The message does not appear in "All Conversations"** (MaiAgent did not receive it):

1. In the <mark style="color:blue;">Messaging API</mark> settings of LINE Official Account Manager, check that the Webhook URL is the one provided by MaiAgent and has not been changed by another service; see [Step 8](#step-set-webhook-url-in-line). An official account can have only one Webhook URL.
2. Check that <mark style="color:blue;">Webhook</mark> is turned on in the LINE response settings; see [Step 9](#step-configure-messaging-api-channel).
3. Check that the <mark style="color:blue;">Channel ID</mark>, <mark style="color:blue;">Channel Secret</mark>, and <mark style="color:blue;">Channel Access Token</mark> entered in the MaiAgent chat platform match those in LINE Developers. If you reissue the Token or Secret on the LINE side, update them in MaiAgent.

**The message arrived, but the Agent did not reply**:

1. Check whether <mark style="color:blue;">Auto Reply</mark> is turned off for this conversation, or whether the conversation has been taken over by a human agent. The Agent does not reply during a takeover; after handling, switch the conversation back to AI. See [All Conversations](/maiagent-user-guide/en/serve/daily-operations/reply.md#handoff-actions).
2. Check whether the current time falls within the automatic reply hours set on the chat platform; see [Website: Auto-Reply Settings](/maiagent-user-guide/en/build/choose-channel/web-chat/website.md#auto-reply-settings).
3. For group conversations, check whether "Respond only when @mentioned in groups" is turned on. When on, the Agent replies only if the official account is @mentioned or an Agent message is quoted; see [Using in LINE Groups](#line-group).
4. Check whether <mark style="color:blue;">Enabled</mark> on the chat platform has been turned off; see [Feature Settings](/maiagent-user-guide/en/build/conversation-settings/platform-settings/function-settings.md#basic-functions).
5. Check whether the organization's Credits or this chat platform's quota has been used up. When the chat platform's quota is used up, the Agent pauses replies and users receive only a quota notice message; see [Chat Platform Credits Quota Management](/maiagent-user-guide/en/others/credits/inbox-credit-quota.md#quota-exceeded-behavior).
6. If you have configured [Hook Message Interception](/maiagent-user-guide/en/build/hook.md), check the [Hook Execution Logs](/maiagent-user-guide/en/build/hook/execution-logs.md) to confirm whether the message was blocked.

If everything above is normal and there is still no reply, note the conversation time and conversation URL and contact your MaiAgent representative for help.

## Receiving an Auto-Response Message from LINE <a href="#line-auto-response" id="line-auto-response"></a>

If a user receives the following text after sending a message, the LINE Official Account's auto-response message is still on. This text is sent by LINE, not by the Agent:

> Thank you for your message!\
> Sorry, this account cannot reply to users' messages individually.\
> Please look forward to our next broadcast.

How to fix it:

1. Follow [Step 9](#step-configure-messaging-api-channel) to turn off <mark style="color:blue;">Auto-response messages</mark>. When <mark style="color:blue;">Chat</mark> is on, set the response method for both <mark style="color:blue;">Response hours</mark> and <mark style="color:blue;">Non-response hours</mark> to <mark style="color:blue;">Manual chat</mark>.
2. Confirm that <mark style="color:blue;">Webhook</mark> is still on.
3. Send another message to test. When the settings are correct, you receive only the Agent's reply.

While Webhook is on, MaiAgent still receives and replies to messages, so before the settings are corrected, users may see both this text and the Agent's reply.

## User-Shared Locations <a href="#location-messages" id="location-messages"></a>

When a user shares a place in LINE using "Location", MaiAgent receives it into the conversation as a message: the message content is the place name and address (shown as "📍 Shared a location" if LINE does not provide them), and the latitude and longitude are recorded separately in the message's metadata (`latitude`, `longitude`).

To have the Agent answer based on the user's location (for example, recommending the nearest store), turn on the switch under [Feature Settings → Answer using location information](/maiagent-user-guide/en/build/conversation-settings/platform-settings/function-settings.md#gps-location) for this LINE chat platform. Once enabled, the Agent's replies include a "📍 Share location" quick reply button, and the user can tap it to send their current location to the Agent.

## ⚠️ Important Notes <a href="#important-notes" id="important-notes"></a>

**Limitations**

* A LINE group can have only one Agent added
* A newly added Agent causes the previous one to be removed automatically

### Sharing the Official Account with Other LINE Back-Office Services <a href="#share-line-official-account-with-other-services" id="share-line-official-account-with-other-services"></a>

A LINE Official Account can have only one Webhook URL at a time. If you set the Webhook directly to MaiAgent, LINE events are sent directly to MaiAgent and are not delivered to your existing third-party back office at the same time. As a result, features of the third-party back office that originally depend on the Webhook (for example, follow/block events, keyword filtering and tagging, delivery events, or conversation records) may no longer receive data; the actual impact still depends on that service's implementation.

Conversations that MaiAgent receives and processes are retained in MaiAgent's "All Conversations". If the existing third-party back office must also retain the features above, we recommend confirming the integration architecture before the official switchover. A common approach is to make the third-party service the LINE Webhook entry point, have it finish event and keyword processing first, and then forward the messages that need an AI reply to MaiAgent. This approach requires a custom integration, and the original LINE request body and the `X-Line-Signature` header must be preserved; the same reply token can also be used only once, so avoid having the two services reply to the same event twice.

MaiAgent's LINE replies are not limited to plain text. In addition to text and images, [FlexMessage cards and interactive buttons](/maiagent-user-guide/en/build/tools/agent-ui.md) configured in Agent UI are also supported, and you can guide users with image-and-text options. What is actually displayed depends on the Agent and Agent UI settings.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/build/choose-channel/line.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
