Haven't installed OpenClaw yet? Click here for one-line install commands
curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Worried about affecting your computer? ClawTank runs in the cloud with no installation — no risk of accidental deletion
Key Findings
  • LINE has over 21 million monthly active users in Taiwan with a penetration rate exceeding 90%, making it the optimal channel for deploying AI customer service agents[9]
  • Integrating OpenClaw with LINE Official Account requires just four steps: create a Messaging API Channel, configure Channel Token and Secret, set up Webhook, and complete Pairing verification[1]
  • Through OpenClaw Gateway's Remote mode, LINE users' messages can be forwarded to the AI agent in real time, enabling enterprise-grade AI customer service with automated replies, ticket routing, and multi-turn conversations[5]
  • Rich Menu, Flex Message, and multimedia message support allow AI agents to deliver not just text responses but structured cards, graphic menus, and interactive buttons[2]
  • Enterprise deployments must pay special attention to LINE Messaging API rate limits, Token rotation mechanisms, and security best practices to ensure stable production operations[7]

1. Why Choose LINE × OpenClaw?

1.1 LINE's Dominant Position in the Taiwan Market

In Taiwan's instant messaging market, LINE's position is virtually unassailable. According to LINE's officially published data, LINE has over 21 million monthly active users in Taiwan, with a penetration rate exceeding 90%.[9] From teenagers to seniors, from personal social use to enterprise communications, LINE has become the digital infrastructure of daily life in Taiwan. This means that if your enterprise wants to deploy an AI customer service agent in Taiwan, LINE Official Account is virtually the only channel that reaches all customer segments.

Rather than asking customers to download a new app or visit an unfamiliar web interface, let AI live inside the LINE they use every day — this is the core value of integrating OpenClaw with LINE.

1.2 Business Advantages of LINE Official Account

LINE Official Account (formerly LINE@) provides enterprises with a complete commercial communications infrastructure:[3]

1.3 What Does OpenClaw Bring to LINE?

Traditional LINE Bot development requires setting up your own server, handling Webhooks, managing conversation state, and integrating NLP engines — this engineering work is often more complex than the AI conversation itself. OpenClaw fundamentally changes this workflow:[8]

2. Prerequisites

Before starting the integration, confirm that the following three prerequisites are in place:

2.1 LINE Developers Account

Go to LINE Developers to register or log into your account. If you don't have a LINE Developers account yet, you can log in with your existing personal LINE account, and the system will automatically guide you through the developer account setup process.[2]

2.2 LINE Official Account

Go to LINE Official Account Manager to create or confirm your LINE Official Account.[3] Choose a plan that suits your business scale:

PlanMonthly Fee (NTD)Free Push MessagesSuitable For
Free$0500Small businesses or test environments
Light$8004,000SMB daily customer service
Advanced$4,00025,000Mid-to-large enterprise high-traffic customer service

Important note: AI customer service auto-replies count as Reply Messages, which do not consume push message quotas. Only proactive Push Messages deduct from the free quota. Therefore, even the free plan can handle a large volume of customer service conversations.

2.3 OpenClaw Installed and Running

If you haven't installed OpenClaw yet, refer to the one-click install commands at the top of this page, or go to Architecture Deep Dive & Complete Deployment Guide for a full deployment walkthrough. Confirm that OpenClaw is running properly:[4]

openclaw --version
openclaw gateway status

You should see version number output and the Gateway's running status. If the Gateway hasn't started yet, run:

openclaw gateway start

3. Step 1: Create a LINE Messaging API Channel

LINE's Bot functionality is provided through a "Messaging API Channel." Here are the complete steps to create a Channel in the LINE Developers Console:[2]

3.1 Create a Provider

  1. Log in to the LINE Developers Console
  2. Click "Create a new provider"
  3. Enter a Provider name (typically your company name, e.g., "My Company")
  4. Click "Create"

A Provider is the top-level organizational unit in LINE Developers. Multiple Channels can be created under a single Provider. It is recommended to create one Provider per company or team.

3.2 Create a Messaging API Channel

  1. On the Provider page you just created, click "Create a Messaging API channel"
  2. Fill in the Channel basic information:
    • Channel type: Select "Messaging API"
    • Channel name: Your Bot's display name (e.g., "AI Smart Customer Service")
    • Channel description: A brief description of the Bot
    • Category / Subcategory: Select the category closest to your business
    • Email address: Contact email
  3. Check the box to agree to LINE's terms of use, then click "Create"

3.3 Obtain Channel Secret and Channel Access Token

After Channel creation is complete, you need to obtain two key credentials:

Obtain Channel Secret:

  1. Enter the Channel page you just created
  2. Switch to the "Basic settings" tab
  3. Find the "Channel secret" field and click to copy

Obtain Channel Access Token:

  1. Switch to the "Messaging API" tab
  2. Scroll to the bottom of the page, find "Channel access token (long-lived)"
  3. Click the "Issue" button to generate a long-lived Token
  4. Copy the generated Token

Safeguard these two credentials carefully — the Channel Secret is used to verify Webhook request signatures, and the Channel Access Token is used for Bot message sending. Anyone who possesses these two credentials has full control over your Bot.

3.4 Disable Default Auto-Reply

LINE Official Account has "Auto-response messages" and "Welcome messages for new friends" enabled by default, which will conflict with OpenClaw's AI replies. You need to disable them:[3]

  1. Go to LINE Official Account Manager
  2. Select your Official Account
  3. Go to "Settings" → "Response settings"
  4. Set "Auto-response messages" to Disabled
  5. Set "Webhook" to Enabled

This step is critical. If you forget to disable auto-reply, users will receive both LINE's default canned response and OpenClaw AI's response simultaneously, creating a confusing user experience.

4. Step 2: OpenClaw Configuration

After obtaining the Channel Secret and Channel Access Token, return to your terminal and enter these two credentials into OpenClaw's configuration:[1]

4.1 Set Channel Access Token

openclaw config set channels.line.channelAccessToken "YOUR_CHANNEL_ACCESS_TOKEN"

4.2 Set Channel Secret

openclaw config set channels.line.channelSecret "YOUR_CHANNEL_SECRET"

4.3 Verify Configuration

After configuration is complete, verify the settings were correctly saved:

openclaw config get channels.line

You should see output similar to the following (Tokens are displayed masked):

{
"channelAccessToken": "****...****Xk3d",
"channelSecret": "****...****a1b2",
"enabled": true
}

4.4 Set AI Agent Language Preference

Since LINE users in Taiwan primarily communicate in Chinese, it is recommended to explicitly set the language preference in the agent's System Prompt:

openclaw config set agent.systemPrompt "You are a professional AI customer service assistant. Please respond in Traditional Chinese throughout. Keep responses concise but complete, and use bullet points where appropriate to improve readability."

Then restart the Gateway for all settings to take effect:

openclaw gateway restart

5. Step 3: Webhook Configuration and Pairing

LINE Messaging API uses a Webhook architecture — when a user sends a message to your Bot, the LINE platform delivers the message to your specified Webhook URL via HTTP POST. OpenClaw's Gateway is responsible for receiving these Webhook requests.[5]

5.1 Gateway Remote Mode

To allow the external LINE platform to deliver messages to your OpenClaw instance, you need to start the Gateway in Remote mode:

openclaw gateway start --mode remote

Remote mode makes the Gateway listen on a public port to receive Webhook requests from LINE. If your server is behind a firewall or NAT, you'll need one of the following methods to expose the Gateway endpoint:

Using Cloudflare Tunnel as an example:

# Install cloudflared
brew install cloudflare/cloudflare/cloudflared

# Create a tunnel pointing to the Gateway's local port (default 8080)
cloudflared tunnel --url http://localhost:8080

After execution, cloudflared will output a public URL like https://xxxx-xxxx.trycloudflare.com.

5.2 Set Webhook URL in LINE Developers Console

After obtaining the public URL, return to the LINE Developers Console:[2]

  1. Enter your Messaging API Channel
  2. Switch to the "Messaging API" tab
  3. Find the "Webhook settings" section
  4. In the "Webhook URL" field, enter: https://your-public-domain/webhooks/line
  5. Click "Update" to save
  6. Click the "Verify" button to test — if configured correctly, it will display "Success"
  7. Confirm that the "Use webhook" toggle is set to Enabled

Note the Webhook URL path: OpenClaw Gateway's default LINE Webhook receiving path is /webhooks/line. If you've customized the Gateway's routing configuration, make sure the paths match.

5.3 Webhook Signature Verification

LINE's Webhook requests include an x-line-signature signature in the HTTP Header, used to verify that the request genuinely comes from the LINE platform rather than a malicious forgery. OpenClaw automatically uses your configured Channel Secret to verify this signature.[7]

If you receive a 400 error during the verification step, the most common cause is an incorrect Channel Secret configuration. Please re-verify:

# Check if Channel Secret is correct
openclaw config get channels.line.channelSecret

5.4 Complete Pairing Verification

After Webhook setup is complete, you need to complete OpenClaw's Pairing verification — this is OpenClaw's security mechanism to ensure only authorized LINE accounts can control the agent.[10]

  1. Add your Official Account as a friend in LINE and send any message
  2. The Bot will reply with "Pairing Required" along with a six-digit pairing code
  3. Execute the pairing command in your terminal:
# View pending pairings
openclaw pairing list

# Example output:
# ID       Channel   User          Status
# p_abc123 line      U1a2b3c4d5e6  pending

# Approve pairing
openclaw pairing approve p_abc123

After pairing is complete, the Bot will reply with a confirmation message in LINE. From this point on, you can have normal conversations with the AI agent in LINE.

5.5 Test Integration Success

After completing all the steps above, send a test message to your LINE Official Account:

"Hello, please introduce yourself."

If everything is working correctly, you should receive an AI agent response within a few seconds. If there is no response, refer to the troubleshooting section later in this article.

6. Step 4: Group and Permission Management

OpenClaw provides fine-grained access control mechanisms, letting you decide who can interact with the AI agent through LINE.[1]

6.1 DM Policy (Direct Message Policy)

DM Policy controls which LINE users can interact with the agent through one-on-one direct messages:

# Set DM policy
openclaw config set channels.line.dmPolicy "allowlist"

# Add whitelist users (User IDs can be obtained from LINE Developers Console)
openclaw config set channels.line.allowlist '["U1a2b3c4d5e6f7g8h9i0j","Uk9l8m7n6o5p4q3r2s1t"]'

Customer service scenario: If you're deploying a public-facing AI customer service, you need to set DM Policy to anyone so all customers who add the Bot as a friend can use it. However, this also means you need stricter control over the agent's capability scope — ensure it can only handle customer-service-related tasks and cannot access your computer files or execute system commands.

# Public customer service mode
openclaw config set channels.line.dmPolicy "anyone"

# Restrict agent capabilities (allow only knowledge base queries, prohibit file operations)
openclaw config set agent.skills '["knowledge-query","faq-lookup"]'

6.2 Group Policy

If you want to add the Bot to a LINE group, group access control is managed by groupPolicy:

# Set group policy
openclaw config set channels.line.groupPolicy "allowlist"

# Add allowed group IDs
openclaw config set channels.line.groupAllowlist '["C1a2b3c4d5e6f7g8h9i0j"]'

There are two interaction modes in groups:

# Set group trigger mode
openclaw config set channels.line.groupTrigger "mention"

6.3 Admin Permission Levels

For multi-person enterprise management scenarios, OpenClaw supports admin permission levels:

RolePermissionsSuitable For
OwnerFull control: modify settings, manage pairings, operate computerSystem administrators
AdminConverse with the agent, trigger preset tasks, but cannot modify settingsDepartment managers
UserCan only interact with the agent through preset SkillsGeneral employees or customers
# Set admins
openclaw config set channels.line.admins '["U_admin_user_id_1","U_admin_user_id_2"]'

7. Advanced Features: Rich Menu and Multimedia Messages

LINE Messaging API provides rich interactive elements beyond plain text conversations. OpenClaw can leverage these features to enhance the AI customer service experience.[2]

7.1 Rich Menu (Graphic Menu)

Rich Menu is a custom menu at the bottom of the LINE chat room. Users can tap buttons on the menu to trigger preset actions. You can create a Rich Menu through the LINE Official Account Manager or manage it programmatically via the Messaging API.

Creating via LINE Official Account Manager:

  1. Go to LINE Official Account Manager → Chat room related → Rich Menu
  2. Select a template (layout)
  3. Set the action type for each area:
    • Text: Automatically sends preset text when tapped (e.g., "Check order status," "Contact human agent")
    • URI: Opens a web link when tapped
    • Postback: Sends custom data to the Webhook without displaying in the chat room
  4. Set the display period and default open state

Tips for using with OpenClaw: Set Rich Menu button text to natural language commands, for example:

7.2 Flex Message

Flex Message is LINE's proprietary structured message format that can create rich card-style layouts. OpenClaw supports sending Flex Messages via JSON templates:

# Define Flex Message template in OpenClaw Skill
# config/skills/line-product-card.json
{
"type": "flex",
"altText": "Product information",
"contents": {
"type": "bubble",
"hero": {
  "type": "image",
  "url": "https://example.com/product.jpg",
  "size": "full",
  "aspectRatio": "20:13"
},
"body": {
  "type": "box",
  "layout": "vertical",
  "contents": [
    {"type": "text", "text": "{{product_name}}", "weight": "bold", "size": "xl"},
    {"type": "text", "text": "NT$ {{price}}", "size": "lg", "color": "#b8922e"}
  ]
},
"footer": {
  "type": "box",
  "layout": "vertical",
  "contents": [
    {"type": "button", "action": {"type": "uri", "label": "Buy Now", "uri": "{{buy_url}}"}}
  ]
}
}
}

When the AI agent needs to display product information, order details, or other structured content, it automatically uses the corresponding Flex Message template instead of plain text replies.

7.3 Multimedia Message Handling

OpenClaw supports receiving and processing multimedia messages sent by LINE users:

# Enable multimedia message handling
openclaw config set channels.line.mediaHandling "enabled"

# Set the multimedia processing model (requires multimodal capabilities)
openclaw config set agent.visionModel "gpt-4o"

8. Enterprise Deployment: Multi-Account Management and Traffic Control

8.1 LINE Messaging API Rate Limits

LINE Messaging API has strict rate limits that enterprise deployments must handle properly:[2]

API TypeRate LimitDescription
Reply MessageNo rate limitReply to user messages; Reply Token must be used within 30 seconds of receiving the Webhook
Push Message100,000/minProactive push; subject to plan quota limits
Multicast100,000/minMulti-person push; also subject to plan quota limits
Get User Profile2,000/minQuery user basic profile

Key consideration: The Reply Token is only valid for 30 seconds. This means the AI agent must complete inference and respond within 30 seconds. If you're using a slower LLM for inference (e.g., o3-pro), it may time out. Solution:

# Set fast reply model (for initial response)
openclaw config set channels.line.quickReplyModel "claude-3-haiku"

# Set deep reasoning model (for complex questions)
openclaw config set channels.line.deepModel "claude-sonnet-4"

OpenClaw will first use the fast model to send an initial response (e.g., "Looking that up for you, please wait..."), then send the deep reasoning result via Push Message, avoiding Reply Token timeout.

8.2 Multi-Account Management

Large enterprises typically have multiple LINE Official Accounts (e.g., one per brand, per store, or per department). OpenClaw supports managing multiple LINE Channels within a single instance:

# Configure multiple LINE Channels
openclaw config set channels.line.accounts '{
"brand-a": {
"channelAccessToken": "TOKEN_A",
"channelSecret": "SECRET_A",
"agent": "customer-service-a"
},
"brand-b": {
"channelAccessToken": "TOKEN_B",
"channelSecret": "SECRET_B",
"agent": "customer-service-b"
}
}'

Each LINE Channel can be bound to a different AI agent with different knowledge bases and Skills, enabling brand-differentiated customer service experiences.

8.3 Monitoring and Alerts

In production environments, you need to monitor LINE Channel operational status. OpenClaw provides built-in monitoring metrics:

# View Gateway operational status and usage
openclaw status

# Example output:
# Gateway: running
# Channels: line (connected)
# Uptime: 3d 12h
# API calls (24h): 1,247

Recommended alert rules:

8.4 High Availability Architecture

For enterprise customer service scenarios requiring 24/7 uninterrupted service, the following high availability architecture is recommended:[5]

  1. Multi-instance deployment: Deploy at least two OpenClaw Gateway instances with load balancer traffic distribution
  2. Database redundancy: Use PostgreSQL or Redis as OpenClaw's persistent storage with primary-replica redundancy
  3. Webhook retry mechanism: LINE automatically retries on Webhook response failures (up to 3 times); ensure the Gateway handles requests idempotently
  4. Cross-region deployment: If customers are distributed across multiple regions, deploy Gateways in different cloud regions to reduce network latency

9. Troubleshooting

Below is a compilation of the most common issues and solutions when integrating OpenClaw with LINE:

ProblemPossible CauseSolution
Bot doesn't respond at allGateway not running; Webhook URL misconfigured; Channel Access Token invalidRun openclaw gateway status to confirm running; re-verify Webhook URL in LINE Developers Console; re-issue Token
Webhook verification fails (400 error)Channel Secret misconfigured; Webhook URL path incorrectRe-confirm Channel Secret (openclaw config get channels.line.channelSecret); ensure path is /webhooks/line
"Pairing Required" appears repeatedlyPairing not completed or has expiredRun openclaw pairing list to check status, re-run openclaw pairing approve
Reply delay exceeds 30 secondsSlow LLM inference; Reply Token expiredSwitch to a fast model (Haiku) for initial replies; enable dual-model architecture (fast reply + Push deep reply)
Bot doesn't respond in groupsInsufficient Bot permissions; groupPolicy not configuredAdd Bot as a member in group settings; confirm groupPolicy and groupAllowlist are configured correctly
Multimedia messages can't be processedmediaHandling not enabled; multimodal model not setRun openclaw config set channels.line.mediaHandling "enabled"; set visionModel
Garbled Chinese responsesModel language preference not set; encoding issuesAdd language preference to System Prompt; confirm Gateway Response Encoding is UTF-8
Rich Menu buttons don't workAction type misconfigured; Postback Data not handled by OpenClawConfirm Rich Menu action type is "text" (auto-sends preset text); or configure Postback handling in OpenClaw
Token expired or revokedChannel Access Token manually revoked or LINE security mechanism triggeredRe-issue Token in LINE Developers Console and update OpenClaw configuration

9.1 Advanced Debugging: Viewing Gateway Logs

If the common problems above don't resolve your issue, you can perform in-depth debugging through Gateway logs:

# View real-time logs
openclaw logs --follow

# View the last 100 log entries
openclaw logs --limit 100

9.2 Webhook Connectivity Test

You can use curl to simulate a LINE Webhook request to test whether the Gateway responds properly:

curl -X POST https://your-domain/webhooks/line \
-H "Content-Type: application/json" \
-H "x-line-signature: test" \
-d '{"events":[]}'

If the Gateway is running properly, it should return HTTP 200. If it returns 403 or 500, check the logs to identify the error.

10. Case Studies: AI Customer Service Deployment for Taiwan Enterprises

Below are three typical Taiwan enterprise AI customer service deployment scenarios, illustrating practical applications of OpenClaw × LINE.

10.1 Case 1: E-Commerce Platform — 24/7 Smart Customer Service

Business Background: A mid-sized e-commerce platform receives approximately 500 customer service messages daily through its LINE Official Account, covering order inquiries, return/exchange requests, and product consultations. Originally handled by 5 customer service staff on rotating shifts, with an average response time of 15 minutes.

Deployment Plan:

Results:

10.2 Case 2: Medical Clinic — Appointment Scheduling and Health Education Consultation

Business Background: A chain dental clinic with 6 branches receives a large volume of appointment scheduling requests and post-treatment consultations daily through LINE. Nursing staff spend significant time repeatedly answering the same questions.

Deployment Plan:

Results:

10.3 Case 3: Financial Institution — Internal Knowledge Management Assistant

Business Background: A local bank's wealth management department has a large volume of regulatory documents, product DMs, and operational SOPs. Financial advisors spend significant time each day searching documents and confirming regulations.

Deployment Plan:

Results:

11. Security Best Practices

Deploying an AI agent on LINE means extending your enterprise's intelligent capabilities to a public communication channel. The following security principles must be strictly observed:[7]

  1. Principle of least privilege: The AI agent's Skill permissions should be limited to the minimum scope required by business needs. A customer service bot doesn't need file system access; a knowledge query assistant doesn't need the ability to execute system commands
  2. Regular Token rotation: Re-issue the Channel Access Token every 90 days and update the OpenClaw configuration. If Token leakage is suspected, immediately revoke and regenerate it in the LINE Developers Console
  3. Never disable Webhook signature verification: OpenClaw enables LINE Webhook signature verification by default. Do not disable this feature for development convenience
  4. Regularly audit paired devices: Use openclaw pairing list to view all paired connections and remove those no longer in use or unrecognized
  5. Conversation content encryption: Ensure the Gateway only accepts HTTPS connections and enable TLS 1.3 on the server side
  6. Sensitive information filtering: Configure AI agent output filtering rules to prevent leakage of credit card numbers, national ID numbers, and other personally sensitive information
  7. Audit logging: Enable complete conversation records and operation logs for post-incident investigation and compliance auditing
# Enable security-related settings
openclaw config set security.webhookSignatureVerification true
openclaw config set security.auditLog true
openclaw config set security.sensitiveDataFilter true
openclaw config set security.tlsMinVersion "1.3"

Conclusion

LINE is the shortest path for Taiwan enterprises to reach their customers, and OpenClaw is the open-source engine that makes AI agents truly work for enterprises. Combining the two enables organizations of any size to deploy a dedicated AI customer service agent in the shortest possible time — no need to develop Bot code yourself, no need to maintain an NLP engine, and no need to build complex backend infrastructure.[8]

This article covered the complete integration workflow from scratch: creating a Messaging API Channel in the LINE Developers Console, entering credentials into OpenClaw, configuring Webhook and Pairing, setting up group permissions, through to advanced features like Rich Menu, Flex Message, multimedia handling, as well as enterprise deployment requirements including multi-account management, traffic control, and security strategies.

If this is your first time with OpenClaw, we recommend first reading the Architecture Deep Dive & Complete Deployment Guide for basic installation and concept understanding. If you're interested in integrating with other messaging platforms, see the Telegram Integration Guide or the Enterprise Integration Guide. For enterprises with higher security requirements, we recommend also reading the Security Deep Dive article.

AI customer service is not the future tense — it's the present tense. Start your OpenClaw × LINE integration journey now.