# Problem connecting rasa chatbot with facebook messenger

**URL:** <https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219>\
**Category:** Rasa Open Source\
**Created:** [December 9, 2019, 4:52am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219 "2019-12-09T04:52:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 9, 2019, 4:52am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/1 "2019-12-09T04:52:47Z")

</div>

I am trying Connecting rasa chatbot to Facebook Messenger,The rasa chatbot works perfectly in rasa shell. I am trying to integrate this rasa chatbot to facebook messenger. I have created a facebook page. Also developed a facebook app messenger from [developers.facebook.com](http://developers.facebook.com) and added the access token and secret in credentials.yml and validated the webhooks through ngrok but when i Starts a Rasa server using command:rasa run. i am getting this problem

```auto
2019-12-09 10:21:22 INFO root - Starting Rasa server on http://localhost:5005
2019-12-09 10:21:28.437090: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)

```

please help me to solve this issue.

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [December 9, 2019, 12:58pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/2 "2019-12-09T12:58:18Z")

</div>

The error seems to be related to cuda. How did you installed rasa? What version of tensorflow are you using?

Can you please start your bot in debug mode, just add the `--debug` flag, and paste the log output here? Thanks.

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 10, 2019, 4:46am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/3 "2019-12-10T04:46:04Z")

</div>

Hello , i have installed rasa following rasa installation guide.using this command: pip3 install rasa-x --extra-index-url [Simple Index](https://pypi.rasa.com/simple) and i am currently using tensorflow version:1.14.0 and my result is :

 ![Screenshot%20from%202019-12-10%2010-00-10](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/046719acc1e09bce0d84fe4e793f0cda6453d78a.png)

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [December 10, 2019, 9:23am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/4 "2019-12-10T09:23:01Z")

</div>

What rasa version are you using?

You mentioned that in rasa shell the bot is actually working. Do you see any other error when you try to connect to Facebook Messenger? Just to be sure, you followed all steps described here: [Facebook Messenger](https://rasa.com/docs/rasa/user-guide/connectors/facebook-messenger/) ?

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 11, 2019, 5:23am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/5 "2019-12-11T05:23:58Z")

</div>

Hi , i am using Rasa Core version: 0.14.5 , rasa-nlu version: 0.15.1 and rasa-sdk version :1.4.0 . yes, I followed all steps described in rasa doc to integrate chatbot with facebook messenger, i faced a problem to Set up a Webhook and select at least the messaging and messaging\_postback subscriptions but after that i solved that issue, this the screenshot for that.

 ![Screenshot%20from%202019-12-11%2010-46-29](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/0a7337d67dcc5a2b7e1dc40960db66d634909e9b.png)

I have already added verify token, secret and page\_access\_token to the credentials file. Here, is the screenshot of that.

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 11, 2019, 5:31am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/7 "2019-12-11T05:31:09Z")

</div>

I have already added verify token, secret and page\_access\_token to the credentials file. Here, is the screenshot of that.

 ![Screenshot%20from%202019-12-11%2010-51-39](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/27ddb6aac7e8f94b5fa71fbacdf7f932029b4c8d.png)

I have already added the endpoint for receiving Facebook messenger messages Here, is the screenshot of that:

 ![Screenshot%20from%202019-12-11%2010-59-17](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/a/a838e056b25a427b95762030b3592072b6500b8b.png)

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [December 11, 2019, 7:46am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/8 "2019-12-11T07:46:59Z")

</div>

mmhh… and you do not see any other error in the output?

Did you considered updating your Rasa version? We are already at 1.5.2.

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [December 11, 2019, 9:10am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/9 "2019-12-11T09:10:04Z")

</div>

it looks like your `action_endpoint` is pointing at the facebook webhook, that shuold just stay as is (`localhost:5055/webhook` if you’re using `rasa run actions`)

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 11, 2019, 12:20pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/10 "2019-12-11T12:20:31Z")

</div>

Thank you for your reply. i integrated my chatbot with facebook messenger , now it is chatting with me.But when when i tried to perform some custom action that time won’t work.it throwing this error:

 ![Screenshot%20from%202019-12-11%2017-48-00](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/1badcae72f872ef0162f1f25fea3afae7db68512.png)

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [December 11, 2019, 12:33pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/11 "2019-12-11T12:33:27Z")

</div>

yep, just a small error there. your custom action is (or should be running) on port `5055`, not `5005`. 5005 is the rasa server

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 11, 2019, 12:51pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/12 "2019-12-11T12:51:05Z")

</div>

thank you for your reply, i know 5005 is the rasa server but where to add port:5055

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [December 11, 2019, 1:02pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/13 "2019-12-11T13:02:48Z")

</div>

in your `endpoints.yml`

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 11, 2019, 1:33pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/14 "2019-12-11T13:33:05Z")

</div>

yes i added in endpoints.yml but still i am getting error.this the screenshot for that.

 ![Screenshot%20from%202019-12-11%2018-57-54](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/6/6627c1c20be4bcd2fa16b6b651c16dd7d2fddc9e.png) ![Screenshot%20from%202019-12-11%2019-01-35](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/3/3ef8c0b026229be51d1b354efbb826a39b2cae18.png)

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [December 11, 2019, 1:54pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/15 "2019-12-11T13:54:19Z")

</div>

you need to start you action server. To do that, open a new terminal tab and run `rasa run actions`, see [Actions](https://rasa.com/docs/rasa/core/actions/#custom-actions-written-in-python)

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 12, 2019, 6:32am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/16 "2019-12-12T06:32:34Z")

</div>

Thank you for your reply. i also ran rasa run actions but it was not working custom action. now i am getting another problem “The Callback URL or Verify Token couldn’t be validated. Please verify the provided information or try again later” . Because ngrok webhook session expried within 7 .54 hours, so i am trying to established connection again for this reason the is comming.Is their any solution for this. this the screenshot for that.

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 12, 2019, 6:33am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/17 "2019-12-12T06:33:25Z")

</div>

![Screenshot%20from%202019-12-12%2012-01-23](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/7/7e84c68ea5266f0b8f7463ca212ba730bd75ab7d.png)

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 12, 2019, 6:35am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/18 "2019-12-12T06:35:11Z")

</div>

![Screenshot%20from%202019-12-12%2012-04-38](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/44bb0b297009a81b9062101bfc39cdaa152dfa92.png)

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 12, 2019, 12:26pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/19 "2019-12-12T12:26:54Z")

</div>

Hi there, i am successfully conntected my chatbot with facebook messenger but one problem is their ,it can not perform custom action and showing warning massage “Facebook API currently allows only up to 3 buttons. If you add more, all will be ignored.” Please anyone can help me to write custom and solve this error.his the screenshot for that

 ![Screenshot%20from%202019-12-12%2017-50-13](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/ffe5712a9366a410a09cfcec23979ae667704bca.png)This is my action.yml file : ![Screenshot%20from%202019-12-12%2017-51-59](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/28035b1cd301228721ea9339b3d7e4d1ad224ccd.png)This is my chat screen shot ![Screenshot%20from%202019-12-12%2017-50-01](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/dcb32dfb1b43729b1392305bccea3d8046556b42.png)

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [December 12, 2019, 1:52pm UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/20 "2019-12-12T13:52:52Z")

</div>

reading the error, it looks like you are trying to add more buttons than facebook allows. If you just include 1-2 buttons, does it work correctly?

---

<div class="post-metadata">

**Author:** ![sangita](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sangita](https://forum.rasa.com/u/sangita)\
**Post date:** [December 13, 2019, 5:06am UTC](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219/21 "2019-12-13T05:06:41Z")

</div>

Thank you for your reply,yes chatbot is working fine when i added 1-3 buttons.But i want to add more than 3 button, how can i add ? this the screenshot for working 3 button.

 ![Screenshot%20from%202019-12-12%2018-15-30](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/b/b476130c00d1ce9979a10ad0c335af13b693a683.png)

[Next page](https://forum.rasa.com/t/problem-connecting-rasa-chatbot-with-facebook-messenger/22219.md?page=2)
