Regional platforms
LINE
LINE, LINE Messaging API के जरिए OpenClaw से जुड़ता है। Plugin, Gateway पर Webhook रिसीवर के रूप में चलता है और प्रमाणीकरण के लिए आपके channel access token + channel secret का उपयोग करता है।
स्थिति: डाउनलोड करने योग्य Plugin। direct messages, group chats, media, locations, Flex messages, template messages, और quick replies समर्थित हैं। Reactions और threads समर्थित नहीं हैं।
इंस्टॉल करें
channel कॉन्फ़िगर करने से पहले LINE इंस्टॉल करें:
openclaw plugins install @openclaw/lineलोकल चेकआउट (जब git repo से चला रहे हों):
openclaw plugins install ./path/to/local/line-pluginसेटअप
- LINE Developers account बनाएं और Console खोलें: https://developers.line.biz/console/
- एक Provider बनाएं (या चुनें) और Messaging API channel जोड़ें।
- channel settings से Channel access token और Channel secret कॉपी करें।
- Messaging API settings में Use webhook सक्षम करें।
- Webhook URL को अपने Gateway endpoint पर सेट करें (HTTPS आवश्यक है):
https://gateway-host/line/webhookGateway, LINE के Webhook verification (GET) का जवाब देता है और signature तथा payload validation के तुरंत बाद signed
inbound events (POST) को स्वीकार करता है; agent
processing असिंक्रोनस रूप से जारी रहती है।
यदि आपको custom path चाहिए, तो channels.line.webhookPath या
channels.line.accounts.<id>.webhookPath सेट करें और URL को उसी अनुसार अपडेट करें।
सुरक्षा नोट:
- LINE signature verification body-dependent है (raw body पर HMAC), इसलिए OpenClaw verification से पहले strict pre-auth body limits और timeout लागू करता है।
- OpenClaw verified raw request bytes से Webhook events process करता है। signature-integrity safety के लिए upstream middleware-transformed
req.bodyvalues को अनदेखा किया जाता है।
कॉन्फ़िगर करें
न्यूनतम config:
{ channels: { line: { enabled: true, channelAccessToken: "LINE_CHANNEL_ACCESS_TOKEN", channelSecret: "LINE_CHANNEL_SECRET", dmPolicy: "pairing", }, },}Public DM config:
{ channels: { line: { enabled: true, channelAccessToken: "LINE_CHANNEL_ACCESS_TOKEN", channelSecret: "LINE_CHANNEL_SECRET", dmPolicy: "open", allowFrom: ["*"], }, },}Env vars (केवल default account):
LINE_CHANNEL_ACCESS_TOKENLINE_CHANNEL_SECRET
Token/secret files:
{ channels: { line: { tokenFile: "/path/to/line-token.txt", secretFile: "/path/to/line-secret.txt", }, },}tokenFile और secretFile को regular files की ओर point करना चाहिए। Symlinks अस्वीकार किए जाते हैं।
कई accounts:
{ channels: { line: { accounts: { marketing: { channelAccessToken: "...", channelSecret: "...", webhookPath: "/line/marketing", }, }, }, },}Access control
Direct messages default रूप से pairing पर होते हैं। अज्ञात senders को pairing code मिलता है और उनके messages approved होने तक अनदेखे किए जाते हैं।
openclaw pairing list lineopenclaw pairing approve line <CODE>Allowlists और policies:
channels.line.dmPolicy:pairing | allowlist | open | disabledchannels.line.allowFrom: DMs के लिए allowlisted LINE user IDs;dmPolicy: "open"के लिए["*"]आवश्यक हैchannels.line.groupPolicy:allowlist | open | disabledchannels.line.groupAllowFrom: groups के लिए allowlisted LINE user IDs- Per-group overrides:
channels.line.groups.<groupId>.allowFrom - Static sender access groups को
allowFrom,groupAllowFrom, और per-groupallowFromसेaccessGroup:<name>के साथ reference किया जा सकता है। - Runtime note: यदि
channels.lineपूरी तरह missing है, तो runtime group checks के लिएgroupPolicy="allowlist"पर fallback करता है (भले हीchannels.defaults.groupPolicyसेट हो)।
LINE IDs case-sensitive हैं। Valid IDs ऐसे दिखते हैं:
- User:
U+ 32 hex chars - Group:
C+ 32 hex chars - Room:
R+ 32 hex chars
Message behavior
- Text को 5000 characters पर chunks में बांटा जाता है।
- Markdown formatting हटाई जाती है; code blocks और tables को संभव होने पर Flex cards में बदला जाता है।
- Streaming responses buffered होते हैं; agent के काम करते समय LINE को loading animation के साथ पूरे chunks मिलते हैं।
- Media downloads
channels.line.mediaMaxMb(default 10) से capped हैं। - Inbound media को agent तक pass किए जाने से पहले
~/.openclaw/media/inbound/के अंतर्गत save किया जाता है, जो अन्य bundled channel plugins द्वारा उपयोग किए जाने वाले shared media store से मेल खाता है।
Channel data (rich messages)
quick replies, locations, Flex cards, या template
messages भेजने के लिए channelData.line का उपयोग करें।
{ text: "Here you go", channelData: { line: { quickReplies: ["Status", "Help"], location: { title: "Office", address: "123 Main St", latitude: 35.681236, longitude: 139.767125, }, flexMessage: { altText: "Status card", contents: { /* Flex payload */ }, }, templateMessage: { type: "confirm", text: "Proceed?", confirmLabel: "Yes", confirmData: "yes", cancelLabel: "No", cancelData: "no", }, }, },}LINE Plugin Flex message presets के लिए /card command भी ship करता है:
/card info "Welcome" "Thanks for joining!"ACP support
LINE ACP (Agent Communication Protocol) conversation bindings को support करता है:
/acp spawn <agent> --bind herechild thread बनाए बिना current LINE chat को ACP session से bind करता है।- Configured ACP bindings और active conversation-bound ACP sessions, LINE पर अन्य conversation channels की तरह काम करते हैं।
विवरण के लिए ACP agents देखें।
Outbound media
LINE Plugin agent message tool के जरिए images, videos, और audio files भेजने का समर्थन करता है। Media appropriate preview और tracking handling के साथ LINE-specific delivery path के जरिए भेजा जाता है:
- Images: automatic preview generation के साथ LINE image messages के रूप में भेजी जाती हैं।
- Videos: explicit preview और content-type handling के साथ भेजे जाते हैं।
- Audio: LINE audio messages के रूप में भेजा जाता है।
Outbound media URLs public HTTPS URLs होने चाहिए। OpenClaw URL को LINE को सौंपने से पहले target hostname validate करता है और loopback, link-local, और private-network targets को अस्वीकार करता है।
Generic media sends, LINE-specific path उपलब्ध न होने पर existing image-only route पर fallback करते हैं।
Troubleshooting
- Webhook verification fails: सुनिश्चित करें कि Webhook URL HTTPS है और
channelSecretLINE console से मेल खाता है। - No inbound events: पुष्टि करें कि Webhook path
channels.line.webhookPathसे मेल खाता है और Gateway LINE से reachable है। - Media download errors: यदि media default limit से अधिक है, तो
channels.line.mediaMaxMbबढ़ाएं।
Related
- Channels Overview — सभी समर्थित channels
- Pairing — DM authentication और pairing flow
- Groups — group chat behavior और mention gating
- Channel Routing — messages के लिए session routing
- Security — access model और hardening