इंस्टॉल करें
channel कॉन्फ़िगर करने से पहले LINE इंस्टॉल करें:सेटअप
- 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 आवश्यक है):
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:LINE_CHANNEL_ACCESS_TOKENLINE_CHANNEL_SECRET
tokenFile और secretFile को regular files की ओर point करना चाहिए। Symlinks अस्वीकार किए जाते हैं।
कई accounts:
Access control
Direct messages default रूप से pairing पर होते हैं। अज्ञात senders को pairing code मिलता है और उनके messages approved होने तक अनदेखे किए जाते हैं।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सेट हो)।
- 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 का उपयोग करें।
/card command भी ship करता है:
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 की तरह काम करते हैं।
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 के रूप में भेजा जाता है।
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