Facebook Setup - Webhook not resolving

I tried this on 3 different platforms: my laptop, PC, and digitalocean.

Everytime I try to verify the webhook address on Facebook for https://<YOUR_HOST>/webhooks/facebook/webhook. In my case <YOUR_HOST> is the ngrok URL for my PC/Laptop, and the webserver address for digitalocean - Facebook cannot reach the URL.

I have even tried it with the port numbers (5002 and 5005). Still no luck!

I can’t even resolve the URLs within my web browser - so I must be missing some step in the setup? What am I missing?

Has anyone else encountered this situation?

What are you using as the host? Are you using ngrok?

@erohmensing I have used ngrok for my local PC.

Then I set it up within digitalocean, and used the IP address to set it up too. Should I setup a domain for it?

Hm, I’ve never worked with digitalocean, but if you have an ip address then I think the ip address with the port number should work. But you weren’t able to get it running locally via ngrok either?

I can’t even resolve the URLs within my web browser - so I must be missing some step in the setup?

What do you mean by this? perhaps this is the issue

@erohmensing - I am able to access Rasa X through the server/IP address. As for locally - ngrok worked to serve up Rasa X but not the Facebook webhook address.

So, the only thing that won’t resolve is the Facebook webhook address. I am not sure which step I could be missing since I followed everything on the directions down to the T (multiple times) lol.

I realized what I was doing wrong

With the new “rasa run” command I wasn’t specifying the credentials or the endpoints.

I had to edit the endpoints to uncomment the following:

#action_endpoint:
#  url: "http://localhost:5005/webhook"

After I revised endpoints.yml and credentials.yml I ran the below. As a side note - I used this for my Anaconda Windows 10 setup for those wondering the environment.

rasa run -m models --credentials credentials.yml --enable-api --log-file out.log --endpoints endpoints.yml

For others, if you used docker, it should look like this:

docker run -v $(pwd):/app rasa/rasa run -m models --credentials credentials.yml --enable-api --log-file out.log --endpoints endpoints.yml

One last note is that Facebook Webhook only takes “https” so when you run ngrok on your local install, they provide you both http/https.

Thank you so much for the clear explanation of your setup and solution!

1 Like