Here is tutorial on how we can integrate RASA chatbot assistant to Facebook Messenger.
Here we’ll be using ngrok to expose a local server on the internet, so make sure you have installed ngrok before.
If you haven’t installed ngrok, you can install it here.
- Make sure you have created an account in facebook for developers here.
- Go to My Apps and create a new app.
- Click on the app and go to dashboard. Scroll down to My Products and locate Messenger section. Click on settings on messenger section.
- Create a new page and get the page access token. Copy the page access token and paste it in credentials.yml on page-access-token on facebook field.
- Click settings, then click basic menu on the side bar. Copy the app secret and paste it in credentials.yml in secret field on facebook field.
- Fill the verify field in credentials.yml with any string of your choice.
- Run the ngrok.exe, using this command “ngrok http port_number (change the port_number to any port number you available).
- Replace the action_endpoint in endpoints.yml file on RASA with https://<YOUR_HOST>/webhooks/facebook/webhook (change YOUR_HOST with the https host on ngrok)
- Run the “rasa run” command. And replace the webhook on facebook with url in action_endpoint and verify code on credentials.yml
For more explanation about integrating RASA to facebook messenger you can check out this video: