{"id":26,"date":"2026-03-21T22:47:14","date_gmt":"2026-03-21T14:47:14","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-line\/"},"modified":"2026-03-21T23:29:08","modified_gmt":"2026-03-21T15:29:08","slug":"channels-line","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-line\/","title":{"rendered":"LINE"},"content":{"rendered":"<h1>LINE<\/h1>\n<h1>LINE\uff08\u63d2\u4ef6\uff09<\/h1>\n<p>LINE \u901a\u8fc7 LINE Messaging API \u8fde\u63a5\u5230 OpenClaw\u3002\u8be5\u63d2\u4ef6\u4f5c\u4e3a webhook \u63a5\u6536\u5668\u5728 Gateway \u7f51\u5173 \u7f51\u5173\u4e0a\u8fd0\u884c\uff0c\u4f7f\u7528\u4f60\u7684 \u6e20\u9053 access token + \u6e20\u9053 secret \u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002<\/p>\n<p>\u72b6\u6001\uff1a\u901a\u8fc7\u63d2\u4ef6\u652f\u6301\u3002\u652f\u6301\u79c1\u4fe1\u3001\u7fa4\u804a\u3001\u5a92\u4f53\u3001\u4f4d\u7f6e\u3001Flex \u6d88\u606f\u3001\u6a21\u677f\u6d88\u606f\u548c\u5feb\u6377\u56de\u590d\u3002\u4e0d\u652f\u6301\u8868\u60c5\u56de\u5e94\u548c\u8bdd\u9898\u56de\u590d\u3002<\/p>\n<h2>\u9700\u8981\u5b89\u88c5\u63d2\u4ef6<\/h2>\n<p>\u5b89\u88c5 LINE \u63d2\u4ef6\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw plugins install @openclaw\/line<\/p>\n<pre><code>\n\u672c\u5730\u68c0\u51fa\uff08\u4ece git \u4ed3\u5e93\u8fd0\u884c\u65f6\uff09\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw plugins install .\/extensions\/line\n<\/code><\/pre>\n<h2>\u914d\u7f6e\u6b65\u9aa4<\/h2>\n<ol>\n<li>\u521b\u5efa LINE Developers \u8d26\u6237\u5e76\u6253\u5f00\u63a7\u5236\u53f0\uff1a<br \/>\n   <a href=\"https:\/\/developers.line.biz\/console\/\">https:\/\/developers.line.biz\/console\/<\/a><\/li>\n<li>\u521b\u5efa\uff08\u6216\u9009\u62e9\uff09\u4e00\u4e2a Provider \u5e76\u6dfb\u52a0 <strong>Messaging API<\/strong> \u6e20\u9053\u3002<\/li>\n<li>\u4ece\u6e20\u9053\u8bbe\u7f6e\u4e2d\u590d\u5236 <strong>Channel access token<\/strong> \u548c <strong>Channel secret<\/strong>\u3002<\/li>\n<li>\u5728 Messaging API \u8bbe\u7f6e\u4e2d\u542f\u7528 <strong>Use webhook<\/strong>\u3002<\/li>\n<li>\u5c06 webhook URL \u8bbe\u7f6e\u4e3a\u4f60\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u70b9\uff08\u5fc5\u987b\u4f7f\u7528 HTTPS\uff09\uff1a<\/li>\n<\/ol>\n<pre><code>https:\/\/gateway-host\/line\/webhook\n<\/code><\/pre>\n<p>Gateway \u7f51\u5173 \u7f51\u5173\u4f1a\u54cd\u5e94 LINE \u7684 webhook \u9a8c\u8bc1\uff08GET\uff09\u548c\u5165\u7ad9\u4e8b\u4ef6\uff08POST\uff09\u3002\u5982\u679c\u4f60\u9700\u8981\u81ea\u5b9a\u4e49\u8def\u5f84\uff0c\u8bf7\u8bbe\u7f6e <code>channels.line.webhookPath<\/code> \u6216 <code>channels.line.accounts.&lt;id&gt;.webhookPath<\/code> \u5e76\u76f8\u5e94\u66f4\u65b0 URL\u3002<\/p>\n<h2>\u914d\u7f6e<\/h2>\n<p>\u6700\u5c0f\u914d\u7f6e\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    line: {<br \/>\n      enabled: true,<br \/>\n      \u6e20\u9053AccessToken: &#8220;LINE_CHANNEL_ACCESS_TOKEN&#8221;,<br \/>\n      \u6e20\u9053Secret: &#8220;LINE_CHANNEL_SECRET&#8221;,<br \/>\n      dmPolicy: &#8220;pairing&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u73af\u5883\u53d8\u91cf\uff08\u4ec5\u9650\u9ed8\u8ba4\u8d26\u6237\uff09\uff1a\n\n* `LINE_CHANNEL_ACCESS_TOKEN`\n* `LINE_CHANNEL_SECRET`\n\nToken\/secret \u6587\u4ef6\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    line: {\n      tokenFile: &quot;\/path\/to\/line-token.txt&quot;,\n      secretFile: &quot;\/path\/to\/line-secret.txt&quot;,\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u591a\u8d26\u6237\u914d\u7f6e\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    line: {<br \/>\n      accounts: {<br \/>\n        marketing: {<br \/>\n          \u6e20\u9053AccessToken: &#8220;&#8230;&#8221;,<br \/>\n          \u6e20\u9053Secret: &#8220;&#8230;&#8221;,<br \/>\n          webhookPath: &#8220;\/line\/marketing&#8221;,<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n## \u8bbf\u95ee\u63a7\u5236\n\n\u79c1\u4fe1\u9ed8\u8ba4\u4f7f\u7528\u914d\u5bf9\u6a21\u5f0f\u3002\u672a\u77e5\u53d1\u9001\u8005\u4f1a\u6536\u5230\u914d\u5bf9\u7801\uff0c\u5176\u6d88\u606f\u5728\u83b7\u5f97\u6279\u51c6\u524d\u4f1a\u88ab\u5ffd\u7565\u3002\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw pairing list line\nopenclaw pairing approve line &lt;CODE&gt;\n<\/code><\/pre>\n<p>\u5141\u8bb8\u5217\u8868\u548c\u7b56\u7565\uff1a<\/p>\n<ul>\n<li><code>channels.line.dmPolicy<\/code>\uff1a<code>pairing | allowlist | open | disabled<\/code><\/li>\n<li><code>channels.line.allowFrom<\/code>\uff1a\u79c1\u4fe1\u7684\u5141\u8bb8\u5217\u8868 LINE \u7528\u6237 ID<\/li>\n<li><code>channels.line.groupPolicy<\/code>\uff1a<code>allowlist | open | disabled<\/code><\/li>\n<li><code>channels.line.groupAllowFrom<\/code>\uff1a\u7fa4\u7ec4\u7684\u5141\u8bb8\u5217\u8868 LINE \u7528\u6237 ID<\/li>\n<li>\u5355\u7fa4\u7ec4\u8986\u76d6\uff1a<code>channels.line.groups.&lt;groupId&gt;.allowFrom<\/code><\/li>\n<\/ul>\n<p>LINE ID \u533a\u5206\u5927\u5c0f\u5199\u3002\u6709\u6548 ID \u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\uff1a<code>U<\/code> + 32 \u4f4d\u5341\u516d\u8fdb\u5236\u5b57\u7b26<\/li>\n<li>\u7fa4\u7ec4\uff1a<code>C<\/code> + 32 \u4f4d\u5341\u516d\u8fdb\u5236\u5b57\u7b26<\/li>\n<li>\u623f\u95f4\uff1a<code>R<\/code> + 32 \u4f4d\u5341\u516d\u8fdb\u5236\u5b57\u7b26<\/li>\n<\/ul>\n<h2>\u6d88\u606f\u884c\u4e3a<\/h2>\n<ul>\n<li>\u6587\u672c\u6309 5000 \u5b57\u7b26\u5206\u5757\u3002<\/li>\n<li>Markdown \u683c\u5f0f\u4f1a\u88ab\u79fb\u9664\uff1b\u4ee3\u7801\u5757\u548c\u8868\u683c\u4f1a\u5c3d\u53ef\u80fd\u8f6c\u6362\u4e3a Flex \u5361\u7247\u3002<\/li>\n<li>\u6d41\u5f0f\u54cd\u5e94\u4f1a\u88ab\u7f13\u51b2\uff1b\u667a\u80fd\u4f53\u5904\u7406\u65f6\uff0cLINE \u4f1a\u6536\u5230\u5b8c\u6574\u5206\u5757\u5e76\u663e\u793a\u52a0\u8f7d\u52a8\u753b\u3002<\/li>\n<li>\u5a92\u4f53\u4e0b\u8f7d\u53d7 <code>channels.line.mediaMaxMb<\/code> \u9650\u5236\uff08\u9ed8\u8ba4 10\uff09\u3002<\/li>\n<\/ul>\n<h2>\u6e20\u9053\u6570\u636e\uff08\u5bcc\u6d88\u606f\uff09<\/h2>\n<p>\u4f7f\u7528 <code>channelData.line<\/code> \u53d1\u9001\u5feb\u6377\u56de\u590d\u3001\u4f4d\u7f6e\u3001Flex \u5361\u7247\u6216\u6a21\u677f\u6d88\u606f\u3002<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  text: &#8220;Here you go&#8221;,<br \/>\n  \u6e20\u9053Data: {<br \/>\n    line: {<br \/>\n      quickReplies: [&#8220;Status&#8221;, &#8220;Help&#8221;],<br \/>\n      location: {<br \/>\n        title: &#8220;Office&#8221;,<br \/>\n        address: &#8220;123 Main St&#8221;,<br \/>\n        latitude: 35.681236,<br \/>\n        longitude: 139.767125,<br \/>\n      },<br \/>\n      flexMessage: {<br \/>\n        altText: &#8220;Status card&#8221;,<br \/>\n        contents: {<br \/>\n          \/<em> Flex payload <\/em>\/<br \/>\n        },<br \/>\n      },<br \/>\n      templateMessage: {<br \/>\n        type: &#8220;confirm&#8221;,<br \/>\n        text: &#8220;Proceed?&#8221;,<br \/>\n        confirmLabel: &#8220;Yes&#8221;,<br \/>\n        confirmData: &#8220;yes&#8221;,<br \/>\n        cancelLabel: &#8220;No&#8221;,<br \/>\n        cancelData: &#8220;no&#8221;,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\nLINE \u63d2\u4ef6\u8fd8\u63d0\u4f9b `\/card` \u547d\u4ee4\u7528\u4e8e Flex \u6d88\u606f\u9884\u8bbe\uff1a\n\n<\/code><\/pre>\n<p>\/card info &#8220;Welcome&#8221; &#8220;Thanks for joining!&#8221;<br \/>\n&#8220;`<\/p>\n<h2>\u6545\u969c\u6392\u9664<\/h2>\n<ul>\n<li><strong>Webhook \u9a8c\u8bc1\u5931\u8d25\uff1a<\/strong> \u8bf7\u786e\u4fdd webhook URL \u4f7f\u7528 HTTPS \u4e14 <code>channelSecret<\/code> \u4e0e LINE \u63a7\u5236\u53f0\u4e2d\u7684\u4e00\u81f4\u3002<\/li>\n<li><strong>\u6ca1\u6709\u5165\u7ad9\u4e8b\u4ef6\uff1a<\/strong> \u786e\u8ba4 webhook \u8def\u5f84\u4e0e <code>channels.line.webhookPath<\/code> \u5339\u914d\uff0c\u4e14 Gateway \u7f51\u5173 \u7f51\u5173\u53ef\u4ece LINE \u8bbf\u95ee\u3002<\/li>\n<li><strong>\u5a92\u4f53\u4e0b\u8f7d\u9519\u8bef\uff1a<\/strong> \u5982\u679c\u5a92\u4f53\u8d85\u8fc7\u9ed8\u8ba4\u9650\u5236\uff0c\u8bf7\u63d0\u9ad8 <code>channels.line.mediaMaxMb<\/code>\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>LINE LINE\uff08\u63d2\u4ef6\uff09 LINE \u901a\u8fc7 LINE Messaging API \u8fde\u63a5\u5230 OpenClaw\u3002\u8be5 [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":845,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions\/845"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}