Webhook Problem for Facebook Messenger

This error pops up everytime I verify my webhook. Please tell me what I did wrong.

It says that it can’t find “/api/botpress-messenger/webhook”.

This is my config.json file.

In the setting “hostname”, try to delete the api/botpress-messenger/webhook

You should have smth like this :
"hostname": "https://xxxxxxx.ngrok.io/",


i changed it but still same error (404 Not Found)

when I changed the Callback URL on dev.facebook the 200 OK appeared but this error appears

However the Callback URL on the Facebook Developers Center should be with the api/botpress-messenger/webhook

is this error happening with the full url (/api/…)in the Callback URL of Facebook Developers Center ?

yup, full on fbdev, shortened on config.json

Weird, my bot is working on messenger with this settings …

I’ve managed to work it out, thanks for your answers! :slight_smile:

Cool !!
If you understood why this didn’t work, don’t hesitate to post the solution !

It would be nice to share what you did to make it work out.

The hostname should not contain “https://” . The entry should look like below:

“hostname”: “xxxxxxx.ngrok.io

1 Like

Linking Botpress node.js app to Messenger page

•First of all when you run npm start in the CLI editor leave that particular CLI running / dont Cmd/Ctrl+C and do other stuff there . Edit variables, add to git version control, commit version and push the app to your server in a seperate CLI.

•Second up, in _config.json_ make sure that the link on hostname is in the format https://[Bot Server URL]/api/botpress-messenger/

•Third, on webhook setup just add webhook/ or webhook to the link above (Either of the two should work) ...and presto!

1 Like

hey there! I’m also having an issue with the webhook. How did you end up solving it?

@dkl123 Whats the problem you are facing?

Hi the error message I get for the Callback URL is:

The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 403; HTTP Message = Forbidden

The callback url’s format is “https://xxxxxxxx.ngrok.io/api/botpress-messenger/webhook

Config file format is “hostname”: “xxxxxxxx.ngrok.io

I’m using “botpress”: “10.34.0” and “@botpress/channel-messenger”: “^10.41.1”

Any help would be greatly appreciated! Thanks

So I’ve updated my environment variables as well, but still gives me a different error error 404 = Not found instead of the previous error 403 = Forbidden

The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 404; HTTP Message = Not Found

It’s running fine on my local though.
Also I tried switching to “@botpress/channel-messenger”: “10.17.3”

Please follow the below steps:

  1. First run you bot with all the required configuration & hostname settings. At this stage , you may get errors for callback URL.
  2. Then update the webhook appropriately with the hostname.
  3. Now stop and start the bot again. You should not see the error now.