Make your bot available on WhatsApp
Last updated
Make your bot available on WhatsApp
Last updated
Tous droits réservés @ 2023 dydu.
A Meta application created from the Meta for developers interface,
The WhatsApp application installed (on your phone or computer),
A phone number to test the bot.
To create a bot on WhatsApp that will be connected to your dydu bot, we will follow these steps:
Adding and configuring the necessary products from your “Meta for developers” portal.
Creation and configuration of a Meta type integration from the “Channels” menu of the BMS dydu.
Advanced access request for necessary permissions and features.
To make your application work on WhatsApp, we will add and configure the following products:
Facebook login for business,
WhatsApp.
To do this:
Click “Add a product”.
Look for the “Facebook login for Business” product and click “Configure”.
The “Settings” page of the “Facebook login for business” product will open and a new section “Facebook login for business” will be displayed in the left menu.
Return to the products page by clicking “Add a product”.
Search for “WhatsApp” and click on “Configure”.
The “Settings” page of the “WhatsApp” product will open and a new “WhatsApp” section will be displayed in the left menu.
Your products are successfully added! We will proceed to configure them. Let's start with the configuration of the “Facebook login for business” product.
Click Facebook Login for Business > Settings.
Activate the option “Connect with the JavaScript SDK”. This option will allow you to connect to your Facebook account from your integration on the Channels menu of dydu.
Fill in the field “domains authorized for the Javascript SDK”: fill in the field with the main URL of your “Channels” menu.
For example, connect to the Channels menu of the BMS dydu if the full Url is :https://sso.channels.dydu.ai/?ticket=ST-1475-7riKAzdDpiYrbRGbmhLImJ-cDd8-cas-prod-sso#/configurationsKeep only"https://sso.channels.dydu.ai/” for the field Authorized domains for the Javascript SDK.
Click the “Save Changes” button.
Click WhatsApp > Start
Before adding the bot's final phone number and requesting a permanent access token for it, let's start by validating the configuration with a test number provided by META and a temporary access token. To do this:
In the "Send and receive messages" section click on the "To" drop-down list
Click on "Manage phone number list"
A modal opens, click on "Add a phone number"
Fill in the number to add (pay attention to the prefix)
Click on "Next"
The added number will receive a code. It will be necessary to copy this code and thus validate the addition of the number.
Let's go to the step Creating and configuring a Meta-type integration from the "Channels" menu of the BMS dydu
To do this we will need:
the identifier of your META application and the corresponding key,
the identifier of the bot's telephone number and its access token.
These 3 pieces of information are specific to your Meta application and are available on your Meta for Developers portal.
In the Meta for Developers portal, on your app, click Settings > General in the left menu.
Copy and keep your app ID.
Click the “View” button to view your application key. You will be prompted to enter your password to view the key.
Copy and keep your application key.
In the Meta for developers portal, on your application, click WhatsApp > Start in the left menu.
On the main page, look for “Temporary access token”.
Copy and keep this token.
Still on the main page, look for “Send and receive messages”, under your phone number you will find “phone number ID”, copy and keep this value.
With this information, connect to your BMS dydu and open the Channels menu of your bot.
If you already have a Meta type integration? Go directly to step 9.
Click “Create” to create a new integration.
Select the Meta platform.
Give a name to this integration and click on “Create”.
You arrive on the “Information” page allowing you to choose the language and space that will be queried for your bot on WhatsApp.
Click on the “Next” button
A modal opens: enter the identifier of your application as well as the secret key of the Meta application.
This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the app id and secret key? It's explained here!
Once the information has been provided, click on “Save”
You arrive on the “Connection” page, the second and last step in configuring your Meta integration.
On the left, you find the available connections. Click Create next to WhatsApp, to connect your dydu bot to your WhatsApp account.
A new tab will open asking you to continue as “your account” Click on continue as “your account”
Select the WhatsApp account to which you want to connect your dydu bot: this is the WhatsApp account from which your bot will be reachable!
Check for which elements you require access authorization and click on “Save”
A message confirming the association of your WhatsApp account with your Meta integration is displayed: click on the “I understand” button.
You are then redirected to the configuration of your integration from the Channels menu. A “WhatsApp” modal is opened.
Fill in the identifier of the telephone number and the token.
This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the page ID and access token? It's explained here!
Click Update
Your WhatsApp connection is listed!
Click “Finish”
Your bot is now available on WhatsApp but is only accessible for the phone numbers you added during WhatsApp product setup from your meta for developers portal. In addition, the token generated is only valid for 24 hours following its creation (it can be updated as many times as necessary).
To make it available to all WhatsApp users and without any time limit, you must:
request advanced access to certain permissions and features,
pass app control,
generate a permanent token.
To add your phone number, go to WhatsApp > Get Started and look for "Add a phone number".
As the conversations initiated by the company are chargeable, you will be asked to enter a means of payment.
Meta makes these pricing conditions available on its site, to find out more we invite you to consult the Meta site directly and the page dedicated to this purpose.
Go to your Meta for developers portal
Click App Control > Permissions & Features in the left menu
Meta provides online documentation to detail the steps required to create a permanent token. You will find this documentation here.
Once these permissions are granted, you can switch your application to “Live” mode