Install
Install LINE before configuring the channel:Setup
- Create a LINE Developers account and open the Console: https://developers.line.biz/console/
- Create (or pick) a Provider and add a Messaging API channel.
- Copy the Channel access token and Channel secret from the channel settings.
- Enable Use webhook in the Messaging API settings.
- Set the webhook URL to your gateway endpoint (HTTPS required):
channels.line.webhookPath or
channels.line.accounts.<id>.webhookPath and update the URL accordingly.
Security notes:
- LINE signature verification is body-dependent (HMAC over the raw body), so OpenClaw applies a strict pre-auth body limit (64 KB) and read timeout before verification.
- OpenClaw processes webhook events from the verified raw request bytes. Upstream middleware-transformed
req.bodyvalues are ignored for signature-integrity safety.
Configure
Minimal config:LINE_CHANNEL_ACCESS_TOKENLINE_CHANNEL_SECRET
tokenFile and secretFile must point to regular files. Symlinks are rejected.
Inline config values win over files; env vars are the last fallback for the default account.
Multiple accounts:
Access control
Direct messages default to pairing. Unknown senders get a pairing code and their messages are ignored until approved:channels.line.dmPolicy:pairing | allowlist | open | disabled(defaultpairing)channels.line.allowFrom: allowlisted LINE user IDs for DMs;dmPolicy: "open"requires["*"]channels.line.groupPolicy:allowlist | open | disabled(defaultallowlist)channels.line.groupAllowFrom: allowlisted LINE user IDs for groups- Per-group overrides:
channels.line.groups.<groupId>.allowFrom(plusenabled,requireMention,systemPrompt,skills) - Static sender access groups can be referenced from
allowFrom,groupAllowFrom, and per-groupallowFromwithaccessGroup:<name>; see Access groups. - Runtime note: if
channels.lineis completely missing, runtime falls back togroupPolicy="allowlist"for group checks (even ifchannels.defaults.groupPolicyis set).
- User:
U+ 32 hex chars - Group:
C+ 32 hex chars - Room:
R+ 32 hex chars
Message behavior
- Text is chunked at 5000 characters.
- Markdown formatting is stripped; code blocks and tables are converted into Flex cards when possible.
- Streaming responses are buffered; LINE receives full chunks with a loading animation while the agent works.
- Media downloads are capped by
channels.line.mediaMaxMb(default 10). - Inbound media is saved under
~/.openclaw/media/inbound/before it is passed to the agent, matching the shared media store used by other channel plugins.
Channel data (rich messages)
UsechannelData.line to send quick replies, locations, Flex cards, or template
messages.
/card command for Flex message presets:
ACP support
LINE supports ACP (Agent Communication Protocol) conversation bindings:/acp spawn <agent> --bind herebinds the current LINE chat to an ACP session without creating a child thread.- Configured ACP bindings and active conversation-bound ACP sessions work on LINE like other conversation channels.
Outbound media
The LINE plugin sends images, videos, and audio through the agent message tool:- Images: sent as LINE image messages; the preview image defaults to the media URL.
- Videos: require a preview image; set
channelData.line.previewImageUrlto an image URL. - Audio: sent as LINE audio messages; duration defaults to 60 seconds unless
channelData.line.durationMsis set.
channelData.line.mediaKind when set, otherwise inferred
from the other LINE options or the URL file suffix, with image as the fallback.
Outbound media URLs must be public HTTPS URLs of at most 2000 characters. OpenClaw
validates the target hostname before handing the URL to LINE and rejects loopback,
link-local, and private-network targets.
Generic media sends without LINE-specific options use the image route.
Troubleshooting
- Webhook verification fails: ensure the webhook URL is HTTPS and the
channelSecretmatches the LINE console. - No inbound events: confirm the webhook path matches
channels.line.webhookPathand that the gateway is reachable from LINE. - Media download errors: raise
channels.line.mediaMaxMbif media exceeds the default limit.
Related
- Channels Overview — all supported channels
- Pairing — DM authentication and pairing flow
- Groups — group chat behavior and mention gating
- Channel Routing — session routing for messages
- Security — access model and hardening