Connect a Conversation Platform: LINE
Connect a LINE Official Account: obtain the Channel ID, Channel Secret, and Channel Access Token, configure the Webhook URL, and use LIFF to open Web Chat within LINE.
Before You Connect
You have created an AI Assistant on the MaiAgent platform.
You have created a Provider and a LINE Official Account in the LINE Developers console.

Start Connecting
1. Go to https://manager.line.biz/ and select the Official Account you want to connect
Click MaiAgent Testing:

The Official Account settings screen opens:

2. Click Settings in the upper-right corner

On the following screen, click Messaging API in the left menu:

3. Enable the Messaging API service
a. On this page, click Enable Messaging API.

b. Select the Provider you just created (if you have not created one yet, you can still create a Provider on this page).
After selecting it, click Agree.

c. Enter links to documents such as your privacy policy (optional).
Next, you can enter URLs for documents such as your company’s privacy policy. Click “ok” to proceed to the final confirmation.


4. Obtain the Channel ID, Channel Secret, and Channel Access Token
a. After clicking OK, you can obtain the Channel ID and Channel secret for this Messaging API service:

b. Return to LINE Developers to obtain the Channel Access Token.
Open the MaiAgent Provider you just created.

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

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

e. Issue a Channel access token and copy it.
If you have not yet issued a Channel access token, click Issue:

You can then obtain your Channel access token and copy it for use:

5. Go to Messaging Platforms in MaiAgent and select LINE
a. Click Connect Messaging Platform in the upper-right corner.

b. Select LINE as the platform to connect.

6. Enter a name, select an Agent, and paste the Channel ID, Channel Secret, and Channel Access Token you just obtained
The creation form has three tabs: Basic Settings, Feature Settings, and Permission Settings. Fill in the following under Basic Settings:
Name
The name of this messaging platform displayed in the admin interface
AI Assistant
Select the Agent to connect (the one labeled “Default” is the organization’s default Agent). You can leave this blank; AI will not reply if it is blank. See Use human support only, without AI
LINE Channel
Paste the Channel ID, Channel Secret, and Channel Access Token you just obtained
Chat Settings › Only respond when @mentioned in groups
When enabled, the Agent replies only to messages that @mention it in LINE groups. When disabled, it replies to all group messages. See Use in LINE groups
AI Assistant Thinking Animation
Enabled by default. After a user sends a message in a one-to-one chat, LINE immediately displays a loading animation until the Agent sends its reply (up to 60 seconds). The screen notes that this feature works only in one-to-one chats; it does not appear in groups. See AI Assistant thinking animation
Enable Reset Commands, Reset Commands
When enabled, you can add one or more text commands (such as “Start over”). When a user sends a LINE message that exactly matches one of them, a new conversation is opened for that user. The command itself receives no reply; AI answers in the new conversation when the user sends their next message
The Feature Settings tab includes AI Interaction Features (enable OCR) and AI Awareness Settings (use system time in answers plus time zone, and use the sender’s name in answers). See Feature settings for details. In Permission Settings, select which roles can see this platform; see Messaging platform settings overview. All of these can still be changed on the platform settings page after creation.
After entering the credentials, click Test Connection to confirm that LINE accepts them (“Connection successful” appears on success). Then click Connect Messaging Platform in the lower-right corner. Your messaging platform is ready.

AI Assistant thinking animation
This loading animation is provided by LINE. After a user sends a message to the Official Account in a one-to-one chat, an animation appears in the conversation to let them know the Agent is processing it, so they do not mistake the wait for a lack of response. The animation disappears when the Agent sends its reply and is displayed for up to 60 seconds.
Enabled by default: Enabled by default for newly created LINE messaging platforms. It has also been enabled for existing LINE messaging platforms.
Shown only when the Agent replies automatically: The animation is not displayed if a human support agent has taken over the conversation, auto-reply is disabled, or the current time is outside the auto-reply schedule.
Not shown in groups: LINE supports this animation only in one-to-one chats. Groups and multi-person chats are unaffected.
To hide the animation, go to Messaging Platforms and open the LINE platform. In the Basic Settings tab, turn off AI Assistant Thinking Animation, then click Save.
7. Obtain the Webhook URL
When you create a messaging platform, the system automatically sets the LINE Official Account’s Webhook URL to MaiAgent’s URL and verifies it. If the success screen says “Webhook URL automatically configured and verified,” skip step 8 and go directly to step 9 to check the response settings. If it says “Webhook URL automatically configured, but Use webhook is not yet enabled in LINE,” the URL is already set; just enable Webhook in step 9. If it says “Automatic Webhook URL configuration incomplete,” configure it manually as follows.
In Messaging Platforms, select the LINE channel you just created, click Actions, and obtain the Webhook URL from the API section.
8. At https://manager.line.biz/, click “Settings/Messaging API” and paste the Webhook URL you just obtained

9. Adjust response settings: enable Webhook and disable auto-reply messages
LINE Official Accounts have auto-reply messages enabled by default. Unless you turn them off, LINE first sends a preset response when a user sends a message (such as “Sorry, this account cannot reply to individual messages”). See Receiving LINE auto-reply messages.
Go to LINE Official Account Manager, click Settings in the upper-right corner, then Response Settings on the left. You can also reach the same page from the channel’s Messaging API tab in LINE Developers by clicking Edit under Auto-reply messages.
Configure the settings as follows:
Webhook
On
When off, LINE does not forward messages to MaiAgent
Auto-reply Messages (the switch shown when Chat is off)
Off
When on, LINE sends its own preset response
Response Method (the options shown when Chat is on)
Select Manual Chat for both Response Hours and Outside Response Hours
Selecting an option that includes “Auto-reply Messages” makes LINE send its own replies during that period
Greeting Message
As needed
LINE sends this when a user adds the account as a friend. Edit its content in LINE’s admin interface; it is unrelated to the Agent
MaiAgent works whether Chat is on or off. When enabled, support staff can view conversations and reply manually in LINE’s admin interface, while the Agent continues to reply to the same messages as usual.

10. Verify the connection
Try adding your own LINE Official Account as a friend and chatting with the Agent.

If you can view the conversation both at https://manager.line.biz/ and in MaiAgent’s All Conversations, the connection is successful!

Open Web Chat within LINE (LINE LIFF)
To let users open a web chat window directly within LINE (for example, from a rich menu, with their LINE identity passed through), use LINE LIFF to embed Web Chat. Create a LIFF App in LINE Developers and configure its URL. For instructions, see LINE LIFF: What is LINE LIFF in the technical guide.
Monthly message quota
LINE Official Accounts have a monthly limit on push messages, based on the plan you purchased from LINE. Open the LINE messaging platform’s Basic Settings tab. At the top, the Monthly Message Quota card queries LINE in real time and displays Monthly Quota, Used This Month, and Remaining (“Unlimited” for unlimited plans). When the quota runs out, the card turns red with the warning “LINE monthly message quota exhausted”: during this period, neither AI nor human support replies can reach LINE users. Corresponding messages on the conversation page are marked Undelivered. Upgrade your plan in LINE Official Account Manager or wait for the quota to reset next month.
For example, during an online store’s end-of-month promotion, a support manager hears that customers asked about orders on LINE but received no reply. In All Conversations, the Agent’s reply shows “Undelivered: LINE monthly message quota exhausted.” The manager checks Basic Settings for the LINE messaging platform, confirms that the monthly quota has run out, and upgrades the plan in LINE Official Account Manager. Subsequent replies are then sent normally.
Message formatting and consecutive messages
Automatic Markdown-to-plain-text conversion: LINE does not render Markdown. Headings, bold and italic text, links, tables, code, and other Markdown syntax in Agent replies are automatically converted to clean plain text before being sent to LINE (links become “text URL,” and each table row becomes a list item on its own line). You do not need to tell the Agent to avoid Markdown in its role instructions. Text typed by human support staff, Flex cards, and quick reply buttons are unaffected. See Message rendering improvements: messaging channels for details.
Consecutive messages merged into a single turn: When a user sends several images in a row in a one-to-one chat, or sends images followed by text, the Agent waits for the sequence to arrive and answers once, rather than replying to each image separately. For image- or file-only messages, it waits until about 4 seconds have passed without a new message after the last one, up to about 20 seconds; text triggers an immediate reply. When several images are selected at once, it waits for the entire set. Only one turn is processed at a time in each conversation; new messages queue behind the previous turn until it finishes. Voice messages, stickers, videos, and locations trigger immediate replies like text. Group conversations retain their existing behavior.
Use in LINE groups
After you add the Official Account to a LINE group, the Agent replies to every group message by default. To make it reply only when addressed, open the group conversation in All Conversations and enable “Only respond when @mentioned in groups” above the input box. See All Conversations.
Once enabled, group members can call the Agent in two ways:
@mention
Include “@Official Account display name” in the message
The name must exactly match the LINE Official Account’s display name
Quoted reply
Click LINE’s “Reply” on a message previously sent by the Agent, then enter text
No additional @mention is needed. This is particularly useful when you cannot @mention the Official Account in LINE for desktop
Rules for quoted replies:
Only quoting a message sent by the Agent counts as calling it. Quoting another member’s message does not trigger it.
Only text messages count as calling it. Replying to an Agent message with a sticker does not trigger a response or consume Credits.
In groups, the Agent replies by quoting the question, making it clear whom it is answering. If the reply takes longer than LINE’s allowed immediate reply window, it is sent as a regular message without a quote.
These rules do not affect one-to-one chats. The Agent replies to every message without quoting it.
What to check when the Agent does not reply
If a user sends a LINE message but the Agent does not reply, first check whether the message appears in MaiAgent’s All Conversations, then follow the appropriate checks below.
The message does not appear in All Conversations (MaiAgent did not receive it):
In LINE Official Account Manager’s Messaging API settings, check that the Webhook URL matches the one provided by MaiAgent and has not been changed by another service. See step 8. An Official Account can have only one Webhook URL.
Check that Webhook is enabled in LINE’s response settings. See step 9.
Check that the Channel ID, Channel Secret, and Channel Access Token entered in MaiAgent’s messaging platform match those in LINE Developers. If you reissue a Token or Secret in LINE, update it in MaiAgent as well.
The message arrived, but the Agent did not reply:
Check whether Auto-reply is disabled for this conversation or human support has taken over. The Agent does not reply during a takeover; transfer the conversation back to AI when finished. See All Conversations.
Check whether the current time falls within the messaging platform’s auto-reply schedule. See Website: auto-reply settings.
Check whether “Only respond when @mentioned in groups” is enabled for the group conversation. If enabled, you must @mention the Official Account or quote an Agent message to receive a reply. See Use in LINE groups.
Check whether Enabled is turned off for the messaging platform. See Feature settings.
Check whether the organization’s Credits or this messaging platform’s quota have run out. When the platform quota runs out, the Agent stops replying and users receive only a quota notification. See Messaging platform Credits quota management.
If Hook message interception is configured, check the Hook execution logs to see whether the message was intercepted.
If everything above is normal but there is still no reply, record the conversation time and URL, then contact your MaiAgent representative for help investigating.
Receiving LINE auto-reply messages
If a user receives the following text after sending a message, auto-reply messages are still enabled for the LINE Official Account. LINE sends this text, not the Agent:
Thank you for your message! Sorry, this account cannot reply to individual messages. Please look forward to our next update.
To resolve this:
Follow step 9 to disable Auto-reply Messages. If Chat is enabled, change the response method to Manual Chat for both Response Hours and Outside Response Hours.
Confirm that Webhook is still enabled.
Send another test message. With the correct settings, you will receive only the Agent’s reply.
MaiAgent still receives and replies to messages while Webhook is enabled, so users may see both this text and the Agent’s reply until you correct the settings.
Users sharing their location
When a user shares a place using “Location” in LINE, MaiAgent receives it as a message in the conversation. The message contains the place name and address (or “📍 Location shared” if LINE does not provide them). The coordinates are stored separately in the message metadata (latitude, longitude).
To have the Agent answer based on a user’s location (for example, recommend the nearest store), enable Feature Settings → Use Location in Answers for this LINE messaging platform. Once enabled, Agent replies include a “📍 Share location” quick reply button. Users can tap it to send their current location to the Agent.
⚠️ Important notes
Limitations
Messages that support staff reply manually from the LINE admin interface chat screen are not synced to MaiAgent. See step 9.
Only one Agent can be added to a LINE group.
Adding a new Agent automatically removes the previous one.
Share an Official Account with other LINE management services
A LINE Official Account can have only one Webhook URL at a time. If you set the Webhook directly to MaiAgent, LINE events go straight to MaiAgent and are not also sent to the existing third-party service. As a result, features in that service that depend on Webhook data (such as friend-added/blocked events, keyword filtering and tagging, delivery events, or conversation history) may no longer receive data. The actual impact depends on how the service is implemented.
The conversations that MaiAgent receives and processes are kept under “All Conversations” in MaiAgent. If the existing third-party service must also keep 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 handle events and keywords first, and then forward only the messages that need an AI reply to MaiAgent. This approach requires a custom integration, and you must preserve the original LINE request body and the X-Line-Signature header. A reply token can also be used only once, so make sure the two systems do not both reply to the same event.
Migrate from another service to MaiAgent
The moment you click Connect Conversation Platform in MaiAgent to create the LINE conversation platform, the system automatically changes this Official Account's Webhook URL to the MaiAgent URL. Messages are then sent to MaiAgent and no longer reach the original service (the change takes up to about one minute to take effect on the LINE side; if the automatic setup is not completed, follow the manual setup, and the creation form also shows this reminder). So creating the conversation platform is the moment of the switchover. Create it at the time you plan to switch, and follow the steps below in order:
Note the original Webhook URL first: In LINE Developers, open the channel's Messaging API tab and copy the Webhook URL under Webhook settings. If you do not save it, you cannot switch back to the original service later.
Reuse the existing long-lived token. Do not click Reissue: Copy the token that already exists in the Channel access token section of the same page. After you click Reissue, the old token becomes invalid (it can be kept for at most 24 more hours), and the original service can no longer reply.
Create the LINE conversation platform at the planned switchover time: Enter the Channel ID, Channel Secret, and the token you just copied, following steps 5–6. If you only want human agents to reply for now, leave AI Assistant unselected, and right after creation go to Auto-reply Settings and turn off all seven days. See Human customer service only, without AI. This way the AI does not reply from the moment of the switchover.
Confirm that the Webhook was set automatically: If the success screen shows “Webhook URL has been automatically configured and verified,” you are done. If it shows “Use webhook is not enabled” or “Webhook URL automatic configuration was not completed,” follow the on-screen instructions to enable the Webhook (see step 9), or paste the MaiAgent URL manually and click Verify (see steps 7–8).
Confirm that auto-response messages are turned off, then test: Check by following step 9. After about one minute, send a message from your personal LINE account and confirm it appears under All Conversations in MaiAgent. After LINE changes the URL, messages may still reach the old URL for up to about one minute.
To go back to the original service, change the Webhook URL in the Console back to the URL you noted in step 1 and click Verify. You can keep the MaiAgent conversation platform for now, but if you later create a conversation platform for the same Official Account in MaiAgent again, the Webhook is switched over automatically again.
For example, a chain store's Official Account was originally connected to another customer service service. During the day, the administrator saved the original Webhook URL from the Console in a handover document and confirmed that the Channel access token already had a value. In the evening, after the support team went off duty, the administrator created the conversation platform in MaiAgent: pasted the existing token (without clicking Reissue), left AI Assistant empty, and right after creation turned off all seven days of the auto-reply schedule. The screen showed “Webhook URL has been automatically configured and verified,” and a test from a personal LINE account one minute later arrived in MaiAgent. The next day, the team found that the original service's member-linking feature was still needed, so they changed the Webhook back to the original URL, and everything was restored within a few minutes.
For the full preparation checklist and sequence for migrating Messenger and Instagram together, see Migrate from another customer service system to MaiAgent.
MaiAgent's LINE replies are not limited to plain text. In addition to text and images, FlexMessage cards and interactive buttons configured through Agent UI are also supported, which lets you guide users with image-and-text options. The content actually shown depends on the Agent and Agent UI settings.
Last updated
Was this helpful?