You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Botpress连接Messenger遇Facebook API 400错误(#100):callback_url无效求助

Troubleshooting Botpress-Messenger Integration Error (Code 100, Invalid Callback URL)

Hey there, let's walk through the most likely issues causing this callback URL error—even though your fallback URL passed verification in the Facebook Developer Console. Here are the key checks and fixes to get your bot connected:

1. Ensure Your Callback URL Uses HTTPS (Critical for All Scenarios)

Facebook requires all webhook URLs to be HTTPS-enabled (localhost is only allowed in strict debug mode, and Facebook’s servers still can’t reach your local machine directly). If you’re developing locally:

  • Use a tool like ngrok to generate a public HTTPS tunnel for your Botpress server. Run ngrok http 3000 (replace 3000 with your Botpress port) to get a URL like https://abc123.ngrok.io.
  • Update both your Facebook Webhook URL and Botpress config to use this ngrok URL: https://abc123.ngrok.io/api/v1/messenger/webhook.

2. Verify Exact URL Match Between Botpress & Facebook

Even a tiny discrepancy will trigger this error. Double-check:

  • In your botpress-messenger.config.yml, confirm the callbackUrl field matches the URL you entered in Facebook's Webhook settings exactly (including HTTPS, domain, path, and no trailing slashes unless both sides use them).
    Example correct config entry:
    messenger:
      enabled: true
      credentials:
        appId: "YOUR_APP_ID"
        appSecret: "YOUR_APP_SECRET"
        accessToken: "YOUR_ACCESS_TOKEN"
      webhook:
        callbackUrl: "https://your-public-domain.com/api/v1/messenger/webhook"
        verifyToken: "YOUR_VERIFY_TOKEN"
    
  • In Facebook's Developer Console, go to your app > Messenger > Settings > Webhooks, and confirm the URL matches what’s in Botpress down to every character.

3. Watch for Trailing Slashes or Typos

A common gotcha is extra trailing slashes or typos in the URL. For example:

  • Wrong: https://your-domain.com/api/v1/messenger/webhook/ (with trailing slash)
  • Correct: https://your-domain.com/api/v1/messenger/webhook

4. Confirm Botpress Webhook is Active

Make sure the Messenger plugin’s webhook isn’t disabled in Botpress:

  • Go to your Botpress dashboard > Plugins > Messenger > Settings.
  • Ensure the "Enable Webhook" toggle is turned on (if present).
  • Re-enter your credentials and callback URL here, then save and test the connection again.

5. Dig Into Botpress Logs for Detailed Context

If the above steps don’t resolve the issue, check Botpress logs for hidden errors:

  • Navigate to your Botpress installation’s data/logs directory.
  • Look for logs tagged with the Messenger plugin—you might find specific issues like URL parsing errors or connection timeouts that aren’t visible in the UI error message.

Final Test

After making changes:

  1. Go back to Facebook's Webhook settings, click "Verify and Save" to confirm the URL works.
  2. Restart your Botpress server to apply config changes.
  3. Try connecting the Messenger integration again in Botpress.

内容的提问来源于stack exchange,提问作者KISHLAY KISHORE

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:07:06