@asanpo117

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

【OpenClaw】LINE Webhook連携でngrok経由のPOSTリクエストが404エラーになる

OpenClawを使用してLINEボットの連携を進めていますが、Webhookの疎通確認で 404 Not Found が解消できず困っています。解決に向けたアドバイスや、確認すべき設定項目があれば教えていただけないでしょうか。

【実現したいこと】
OpenClawの channels.line を有効にし、ngrokを経由してLINE DevelopersのWebhookを受信・処理したい。

【現在の状況・症状】
LINE Developersコンソールから「検証」ボタンを押すと、ngrokのターミナルにはリクエストが到達している形跡(ログ)が出ますが、OpenClaw側が 404 を返してしまいます。

• ngrok側のログ: POST /api/line 404 Not Found

• OpenClawのログ: 特にエラー出力なし(リクエストを処理している形跡がない)

【これまでに試したこと】
以下のコマンドで設定を行い、ゲートウェイの再起動(openclaw gateway restart)を実施しました。

  1. セキュリティ設定・バインドの変更

• openclaw config set gateway.auth.mode token

• openclaw config set gateway.auth.token "任意のパスワード"

• openclaw config set gateway.bind auto

2.LINEチャンネル設定

• openclaw config set channels.line.accessToken "LINEのアクセストークン"

• openclaw config set channels.line.channelSecret "LINEのシークレット"

• openclaw config set channels.line.webhookPath "/api/line"

• openclaw config set channels.line.enabled true

  1. ngrokの起動と設定

• ngrok http 18789 --host-header=localhost で起動。

• LINE Developers側のWebhook URLには https:///api/line を設定して保存済み。

• トークン等の前後に不要な空白・改行が含まれていないか再確認し、完全初期化からの再設定も試しました。

【環境】
• OS: macOS
• OpenClawバージョン: 2026.3.8 (Node.js環境)
• トンネルツール: ngrok

OpenClawのルーティング設定(webhookPath)がうまく認識されていないのか、他に有効化すべきフラグがあるのか分かりません。openclaw status --deep で他に確認すべき項目などがあればご教示いただけますと幸いです。よろしくお願いいたします。

0 likes

1Answer

Your answer might help someone💌