# WhatsApp

## **Prerequisites**

To make your **Dydu bot** available on **WhatsApp**, you must have the following:

* A **Meta application** created from the **Meta for Developers** interface.
* The **WhatsApp application** installed on your **phone** or **computer**.
* A **phone number** dedicated to **bot testing**.

## **Step 1: Add the necessary products for WhatsApp**

To make your **application** work on **WhatsApp**, you need to **add** and **configure** the following **products**:

* **Facebook Login for Business**
* **WhatsApp**

#### **Procedure:**

1. Click on **“Add a product”** in the **Meta for Developers** interface.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FGoID4fjANVMT13Lyu7Iw%2Fimage.png?alt=media&#x26;token=ee15b13e-caa3-472f-abb5-0ab6090b2ceb" alt="" width="212"><figcaption></figcaption></figure>

2. Search for the **“Facebook Login for Business”** product and click **“Set Up”**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FpEBfM37sWUwH2p4PkokC%2Fimage.png?alt=media&#x26;token=a827a913-af15-432b-8e1c-d6cbe8b58b2c" alt="" width="251"><figcaption></figcaption></figure>

3. The **Settings page** for **Facebook Login for Business** will open, and a new **“Facebook Login for Business” section** will appear in the **left-hand menu**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FxAWwqClL5OLgqGbFdoeY%2Fimage.png?alt=media&#x26;token=bd1858fb-72b8-4b71-9e63-a27e65a2bd1f" alt=""><figcaption></figcaption></figure>

4. Go back to the **Products page** by clicking **“Add a product”**.
5. Search for **“WhatsApp”** and click **“Set Up”**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F6Lw4iBVMlDVYyXOtpdpw%2Fimage.png?alt=media&#x26;token=70078231-ad16-45b1-9735-e6d55ff12343" alt="" width="246"><figcaption></figcaption></figure>

6. The **Settings page** for the **WhatsApp** product will open, and a new **“WhatsApp” section** will appear in the **left-hand menu**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FpHmyJlGi06eggLNmDC5S%2Fimage.png?alt=media&#x26;token=8d1d8297-0134-4c7d-a227-18d25821480e" alt=""><figcaption></figcaption></figure>

Your **products** have been **successfully added**! We will now proceed with their **configuration**.

### **Configure the Facebook Login product**

#### **Procedure:**

1. Click on **Facebook Login for Business > Settings**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FifT8ieD5OetSneRW6VeT%2Fimage.png?alt=media&#x26;token=a6066d7b-d89d-4a21-ba33-abb8e395d0f2" alt="" width="221"><figcaption></figcaption></figure>

2. Enable the option **“Login with the JavaScript SDK.”**
   * This option allows you to **sign in to your Facebook account** from the **integration in Dydu’s Channels menu**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fnzq3sCdH7JTJjGAcuZx7%2Fimage.png?alt=media&#x26;token=89c97cb6-283d-4c4a-8a85-ae0503474a5d" alt="" width="563"><figcaption></figcaption></figure>

3. Fill in the field **“Allowed Domains for the JavaScript SDK”** with the **main URL** of your **Channels menu**.
   * The **URL** can be found in the **web inspector console** (accessible with **F12**) when loading the **Channels menu**, and it should look like this:

> <https://sso.channels.dydu.ai/>

### **Configure the WhatsApp product**

#### **Procedure:**

Before adding your bot’s **final phone number** and generating a **permanent access token**, start by validating the configuration with a **test number** provided by **Meta** and a **temporary access token**.

To do this:

1. Click on **WhatsApp > API Setup**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FXyXrEWSRkwjVM6elLlAu%2Fimage.png?alt=media&#x26;token=96ca51c6-adb4-4e49-aef5-5ddc0de550f1" alt="" width="226"><figcaption></figcaption></figure>

2. To add a **test number**, go to **Step 1: “Select phone numbers.”**

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fj2VYrmABJjcZi5P578fu%2Fimage.png?alt=media&#x26;token=43d533f8-89fb-46d4-b206-f0d20c41728e" alt="" width="563"><figcaption></figcaption></figure>

3. Click on the **“From” dropdown menu.**

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FWF58oX6DwnrZNPSpXNcs%2Fimage.png?alt=media&#x26;token=7f84f95f-fbb3-47e8-96ee-2f6d6b3dbe42" alt=""><figcaption></figcaption></figure>

4. Choose the **test number** provided by **Meta** (**“Test Number”**).
5. Click on the **“To” dropdown menu.**

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FK94wVokv5cCnh8M4euNd%2Fimage.png?alt=media&#x26;token=368d8297-1ce9-4338-9cee-5a4b3d86dc4d" alt=""><figcaption></figcaption></figure>

6. Choose a **phone number** from the list. If no number is available, you can add one by clicking **“Manage phone number list.”**

You can now move on to the next step: **create and configure a Meta integration** from the **Channels menu** in **Dydu’s BMS**.

## **Step 2: Configure WhatsApp from the Channels menu in Dydu’s BMS**

To create a **Meta integration** in **Dydu’s BMS**, follow these steps:

* Obtain your **Meta application ID** and its corresponding **key**.
* Obtain your **bot’s phone number ID** and its **access token**.

This information is specific to your **Meta application** and is available on your **Meta for Developers portal**.

### **Find your Meta application ID and key**

1. In the **Meta for Developers** portal, open your **application**, then click **Settings > General** in the **left-hand menu**.
2. Copy and keep your **application ID**.
3. Click the **“View”** button to display your **application key** — you will be asked to **enter your password** to view it.
4. Copy and keep your **application key** safely.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fe2HwuJm0MM297UJyy56H%2Fimage.png?alt=media&#x26;token=10edc8e4-a882-459f-befa-c551e1a3ac76" alt=""><figcaption></figcaption></figure>

### **Find the phone number ID and access token**

1. Click on **WhatsApp > API Setup** in the **left-hand menu**.
2. Locate the **“Access Token”** section.
3. Copy and keep this **token**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FmGfN8WK4lAHj6pya4DUn%2Fimage.png?alt=media&#x26;token=70b81ca9-48b9-4e3a-ae21-e8773874f295" alt=""><figcaption></figcaption></figure>

4. Go to **Step 1: “Send and receive messages.”**
5. Under your **phone number**, you’ll find the **“Phone Number ID.”** Copy and keep this **value** securely.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FrKQLVQEPYsX7wFYoXGAP%2Fimage.png?alt=media&#x26;token=70454e7c-b946-4803-bd4e-f82cb457f405" alt=""><figcaption></figcaption></figure>

### **WhatsApp configuration in Channels**

With this information, **log in** to your **Dydu BMS** and open your bot’s **Channels menu**.

If you already have a **Meta-type integration**, go directly to **Step 9**.

1. Select the **Meta platform**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F6dLpp14ff5imUg3IUjVh%2FCapture%20d%E2%80%99%C3%A9cran%20du%202025-11-24%2014-00-54.png?alt=media&#x26;token=d0e441bd-df1f-47c7-826c-3206af2c3cef" alt="" width="563"><figcaption></figcaption></figure>

3. Give a **name** to this **integration** and click **“Create.”**
4. You’ll arrive on the **“Information”** page, where you can select the **language** and the **space** that will be used by your **bot on WhatsApp**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FqIGIy1Vzcu0rgQlYgyCW%2FCapture%20d%E2%80%99%C3%A9cran%20du%202025-12-16%2010-46-06.png?alt=media&#x26;token=251649b1-2836-47ec-90a8-a18a00992d2a" alt="" width="563"><figcaption></figcaption></figure>

5. Copy and keep the **endpoint**
6. Click the **“Next”** button.
7. A **modal window** will open — enter your **Meta application ID** and **application secret key**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FaqZfvk385OmgBRTVUPFl%2Fimage.png?alt=media&#x26;token=0a72c644-2355-48d9-aef0-5670a4c91d58" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
These **details** were previously retrieved from your **Meta for Developers** portal.

If you skipped that step and don’t know how to find your **application ID** and **secret key**, we explain it [**here**](#find-your-meta-application-id-and-key)!
{% endhint %}

8. Once the information is provided, click **“Save.”**
9. You’ll be redirected to the **“Connection”** page.
10. On the left, you’ll see the **available connections**. Click **“Create”** next to **WhatsApp** to **connect your Dydu bot** to your **WhatsApp account**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F8AA8Sf7Ukmwjiqy2H1FW%2Fimage.png?alt=media&#x26;token=1b66e37a-d3d7-4544-a87d-406e245eaf0c" alt="" width="332"><figcaption></figcaption></figure>

11. A **new tab** will open asking you to **log in**.
12. **Log in** and **confirm**.
13. You will then be **redirected** to your **integration configuration** in the **Channels menu**. A **“WhatsApp” modal** will appear.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FWZerS7PhmpSrOOO12Xao%2Fimage.png?alt=media&#x26;token=7aa5eae5-9e9f-4791-a7ce-34b7ef30bd37" alt="" width="375"><figcaption></figcaption></figure>

11. Check for which elements you require access authorization and click on “Save”
12. A message confirming the association of your WhatsApp account with your Meta integration is displayed: click on the “I understand” button.
13. You are then redirected to the configuration of your integration from the Channels menu. A “WhatsApp” modal is opened.
14. Fill in the **phone number ID** and the **access token**.

{% hint style="info" %}
These details were previously retrieved from your **Meta for Developers** portal.

If you skipped that step and don’t know how to find your **page ID** and **access token**, we explain it [**here**](#find-the-phone-number-id-and-access-token)!
{% endhint %}

15. Click **“Update.”**
16. Your **WhatsApp connection** is now set up!
17. Click **“Finish.”**

Your **bot** is now **available on WhatsApp**, but it is only **accessible** to the **phone numbers** you added during the **WhatsApp product configuration** in your **Meta for Developers portal**.\
Additionally, the **token** generated is **valid for 24 hours** after its creation (it can be **renewed** as many times as needed).

To make your bot **available to all WhatsApp users** without any time limitation, you must:

* Add your **own WhatsApp phone number**,
* Generate a **permanent token**.

## **Step 3: Use WhatsApp with your own configuration**

### **Add your own phone number**

1. Go back to the **Meta for Developers** interface.
2. To add your **phone number**, go to **WhatsApp > API Setup**.
3. Go to **Step 5: “Add a phone number”** and follow the instructions.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FwpShYE25uwAlYKuWmoCf%2Fimage.png?alt=media&#x26;token=de186a38-3212-4612-b7b9-5b39d5332551" alt=""><figcaption></figcaption></figure>

4. Go to **Step 6: “Add a payment method”** and follow the procedure.

{% hint style="info" %}
Since **business-initiated conversations** are **paid**, you’ll be asked to provide a **payment method**.

**Meta** provides detailed **pricing conditions** on its website. To learn more, please visit the **dedicated page** on **Meta’s official site**.
{% endhint %}

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FJYDaqSPRQ9mjoM8KHaoN%2Fimage.png?alt=media&#x26;token=e4ca6514-dd5f-4a3e-b465-8f65f1ff8923" alt=""><figcaption></figcaption></figure>

### **Generate a permanent token**

Click on **App Control > Permissions and Features** in the **left-hand menu**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F8EbKTAJHQLRiM0XV5TTw%2Fimage.png?alt=media&#x26;token=86c620ab-bd86-485d-834e-129240329da8" alt="" width="218"><figcaption></figcaption></figure>

To create a **permanent token**, **Meta** provides **online documentation** explaining all the necessary steps — you can find it [**here**](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login).

Once these **permissions** are granted, you can switch your **application** to **“Live” mode**.
