Rasa integrate with whatsapp api

Can Rasa integrate with whatsapp api ,if yes then how?

Hi,

any news on this?

Did anyone get the his number approved by whatsapp business api?

Hello! I managed to join Rasa to Chat-Api (https://chat-api.com/). I use communication via CURL towards Rasa’s callback. The output is processed to avoid sending button structures to WhatsApp.

Hi @matias18233,

but did you need to get your whatsapp phone number approved for whatsapp business api?

It is not necessary, you can create a trial account (3 days demo) and try it with your personal number :rocket:

But I want to use it in production for more than 3 days.

Hi, @rasafan!

Unfortunately Chat-API is not free, you will have to pay a monthly fee to use it. The good thing is that they do not charge for individual message delivery, so you can send a large number of messages for the same price.

It is not problem to pay, but can I use my own number for wp business api with chat api?

Hello, @rasafan :slight_smile:

So is! You can use your personal number or a business phone number. Any of the options

Only one account is created and a session similar to “Web WhatsApp” is started. Once this is done, they will provide you with a token number and an identification number. These values ​​will be useful for communication with Rasa.

I use the Rasa callback to make the link. In the output, I transform the buttons into lists to avoid sending buttons to WhatsApp (since WhatsApp is not compatible with the buttons, at the moment :weary:).

WhatsApp Business API:

Twilio provides $ 15 to test Whatsapp through the sandbox, just create a webhook and consume Rasa using the HTTP API.

Another unofficial way is by using this project:GitHub - mukulhase/WebWhatsapp-Wrapper: An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]

Hi, @Xaviertoor!

As a negative point of Twilio is that a commercial number is necessary. On the other hand, Chat-Api can be used from minute 1 with a commercial number or a personal number.

On the other hand, the GitHub link is excellent. I will read more about him.

To create a whatsapp chatbot with rasa, you would need to apply for whatsapp official API.

https://developers.facebook.com/docs/whatsapp/api/reference

there is also a Whatsapp API community about it Facebook Groups

Hey @matias18233 can you show how you configured it work with Chat-Api please

Thanks, Eden

Of course, @jusce17!

I prepare the files and share them

index.php (1.1 KB) tuberia_chat-api_libreria.php (1.5 KB)

Rasa will have to give an answer by a URL in particular, making use of “callback”.

This “callback” will be in charge of interpreting the response returned by rasa and transforming it into a format compatible with the “index.php” file. This file receives two parameters via GET:

  • telefono: (recipient phone number)
  • texto: (message to send) via Chat-Api.

Important note: it is necessary to configure the “index.php” file with the configuration data that Chat-Api delivers: “num instance” (replace with NUM-INSTANCE) and “token secret” (replace with TOKEN -CHAT-API).

Matias - hello. Are you available to take on some rasa based projects? Working on building out a conversational ai platform starting off with a focus on healthcare. Will integrate messaging channels like WhatsApp, messenger.

Thanks

Hello! Would you give me more information about it? By what means can I contact you?

definitely. please reach out at fricktionlessdev@fricktionless.com.

thanks

H Matias, by any chance, would you have an example using python?. I’m trying to connect Rasa to my whatsapp using python and chat-api and having some trouble with it