# Deploy bot on Whatsapp with Twilio

**URL:** <https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756>\
**Category:** Rasa Open Source\
**Created:** [January 21, 2020, 4:56am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756 "2020-01-21T04:56:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishal\_a](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishal\_a](https://forum.rasa.com/u/vishal_a)\
**Post date:** [January 21, 2020, 4:56am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/1 "2020-01-21T04:56:18Z")

</div>

I am trying to deploy my rasabot on whatsapp using twilio api. But I don’t know exactly how it is done. I have made changes to the credentials file. I have also tried with ngrok. But I don’t know how to configure twilio sandbox. Can somebody help? What do the links **when the message comes in** and **status callback url** should contain?

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [January 22, 2020, 12:44pm UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/2 "2020-01-22T12:44:32Z")

</div>

Hi @vishal_a what do your credentials look like at the moment?

---

<div class="post-metadata">

**Author:** ![vishal\_a](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishal\_a](https://forum.rasa.com/u/vishal_a)\
**Post date:** [January 23, 2020, 4:59am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/3 "2020-01-23T04:59:19Z")

</div>

```
twilio:
  account_sid: "AC9xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  auth_token: "9b56xxxxxxxxxxxxxxxxxxxx"
  twilio_number: "+13172458986"

rasa:
  url: "http://localhost:5002/api"
```

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [January 24, 2020, 10:57am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/4 "2020-01-24T10:57:50Z")

</div>

Hey @vishal_a you’ll need to enable whatsapp for your twilio number, as well as change the twilio number to have the following format:

`whatsapp:+44xxxxxxxxxxx`

More information here: [Twilio API for WhatsApp - Twilio](https://www.twilio.com/docs/sms/whatsapp/api)

---

<div class="post-metadata">

**Author:** ![vishal\_a](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishal\_a](https://forum.rasa.com/u/vishal_a)\
**Post date:** [January 24, 2020, 11:16am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/5 "2020-01-24T11:16:40Z")

</div>

I have enabled the whatsapp option for my twilio number. But, I didn’t get what you mean by change the to the format. Shouldn’t it be the same number on my twilio dashboard?? Because I have used that one. How my format is any different than the one you suggested?

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [January 24, 2020, 12:01pm UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/6 "2020-01-24T12:01:44Z")

</div>

> [@vishal\_a](#):
>
> twilio: account\_sid: “AC9xxxxxxxxxxxxxxxxxxxxxxxxxxxxx” auth\_token: “9b56xxxxxxxxxxxxxxxxxxxx” twilio\_number: “+13172458986”

the entry for `twilio_number` should be `twilio_number: "whatsapp:+13172458986"`

---

<div class="post-metadata">

**Author:** ![vishal\_a](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishal\_a](https://forum.rasa.com/u/vishal_a)\
**Post date:** [January 24, 2020, 12:19pm UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/7 "2020-01-24T12:19:48Z")

</div>

Okay! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![vishal\_a](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishal\_a](https://forum.rasa.com/u/vishal_a)\
**Post date:** [January 27, 2020, 4:26am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/8 "2020-01-27T04:26:51Z")

</div>

@akelad what is the link that I’m supposed to provide in twilio console? Right now I’m using ngrok for creating the link. Am I supposed to add anything after the ngrok’s link? (something like /webhooks/rest/webhook) . It gives me this error in the terminal : raise InvalidUsage(“Failed when parsing body as json”) sanic.exceptions.InvalidUsage: Failed when parsing body as json

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [January 30, 2020, 8:32am UTC](https://forum.rasa.com/t/deploy-bot-on-whatsapp-with-twilio/23756/9 "2020-01-30T08:32:51Z")

</div>

it would be `/webhooks/twilio/webhook`
