# CloudAPI WhatsApp Inbox: Setup Guide

***

### STEP 1: Setting up a Meta Developer Account and a Meta Developer App

The [Cloud API](https://developers.facebook.com/docs/whatsapp/cloud-api) and [Business Management API](https://developers.facebook.com/docs/whatsapp/business-management-api) are part of Meta’s Graph API, so you need to set up a Meta developer account and a Meta developer app. To set that up follow the steps:

{% stepper %}
{% step %}
[Register as a Meta Developer](https://developers.facebook.com/docs/development/register)
{% endstep %}

{% step %}
[Enable two-factor authentication for your account](https://www.facebook.com/help/148233965247823)
{% endstep %}

{% step %}
[Create a Meta App](https://developers.facebook.com/docs/development/create-an-app/): Go to  [**developers.facebook.com**](http://developers.facebook.com) > **My Apps** > **Create App**. Select the "Business" type and follow the prompts on your screen.
{% endstep %}

{% step %}
**Connect your App to WhatsApp in Meta Developer Dashboard**

From the App Dashboard, click on the app you would like to connect to WhatsApp. Scroll down to find the "WhatsApp" product and click **Set up**.
{% endstep %}

{% step %}
**Select /Create a Business Manager Account**

Next, you will see the option to select an existing Business Manager (if you have one) or, if you would like, the onboarding process can create one automatically for you (you can customize your business later, if needed).

Make a selection and click **Continue**. This will:

1. Associate your app with the Business Manager account that you selected earlier (or had created for you).
2. Generate a WhatsApp Business Account.
3. Generate a test business phone number and associate it with your WhatsApp Business Account. You can use this number with the API to send an unlimited number of messages to up to 5 recipient phone numbers. Recipient phone numbers can be any valid number, but you must verify each one in the next step.
4. Redirect you to the **WhatsApp** > **Getting Started** (or **Setup**) panel in the App Dashboard.
   {% endstep %}
   {% endstepper %}

***

### STEP 2: Getting Important Information Before Creating the Whatsapp Cloud API Inbox

* For creating a Whatsapp Cloud API inbox on the LimeChat Helpdesk, you need the following details:
  * System user admin access token
    * [Guide link](https://www.notion.so/Generate-system-access-token-from-meta-business-suite-8d39c9ce85e7431f93d39afef4481301?pvs=21) to generate admin access token
  * WABA phone number
  * WABA phone number ID
  * WABA business account ID
* These details can be found inside your Facebook Meta App (a developer account is needed)&#x20;

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FlyRGHgefObYUInedmfEf%2FScreenshot%202024-05-27%20at%203.37.04%E2%80%AFPM.png?alt=media&#x26;token=3eaa90f7-7d71-44f5-8fa8-86311c9c3048" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Please make sure that the app mode is switched to Live mode.
{% endhint %}

***

### STEP 3: Creating a Whatsapp Cloud API Inbox

{% stepper %}
{% step %}
Go to <https://app.limechat.ai> and Log in to your account
{% endstep %}

{% step %}
Go to the “Settings” option and then under the “Inboxes” section select the “Add Inbox” option&#x20;

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FDeuA9qh4b5nByKzokrPr%2FScreenshot%202024-05-27%20at%203.40.08%E2%80%AFPM.png?alt=media&#x26;token=675c0655-0c2d-4de4-803a-9e89961f919a" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Select the **WhatsApp Channel** and then the **WhatsApp Cloud API Inbox**

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2Fj01D9A5aIWNPjf6KSxzh%2FScreenshot%202024-05-27%20at%203.40.17%E2%80%AFPM.png?alt=media&#x26;token=bc53923f-89b5-4631-9bde-77bdc5594690" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FzEI6Ef8qu5BD4MwJ7xsj%2FScreenshot%202024-05-27%20at%203.40.31%E2%80%AFPM.png?alt=media&#x26;token=0447fc52-a902-426b-971f-85d045ab4f2c" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Fill in the details required in the form and click "Next". We prepared these details in [Step 2](#step-2-getting-important-information-before-creating-the-whatsapp-cloud-api-inbox) of this guide.

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FoEV5CKoZn8JHHT9eQifE%2FScreenshot%202024-05-27%20at%203.40.37%E2%80%AFPM.png?alt=media&#x26;token=880606fd-eb8b-4b78-92db-ae2a5c5fbbbc" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Get Webhook Information**

* Save Webhooks details (We will configure these in our Meta App - See [Step 4](#step-4-setting-up-webhooks-on-metas-whatsapp-application))
* This step is important, as all the incoming messages webhooks will start coming to our servers.

  <figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FJD1zgC9zHUOOonOh4mHN%2FScreenshot%202024-05-27%20at%203.40.50%E2%80%AFPM.png?alt=media&#x26;token=0f56ff2a-459a-4d23-9cd8-eb600eda5e3a" alt="" width="563"><figcaption></figcaption></figure>

{% endstep %}

{% step %}
**Add Agents** to the Inbox

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2F6ZSJK7wCEgJEY6YaRcdP%2FScreenshot%202024-05-27%20at%203.52.15%E2%80%AFPM.png?alt=media&#x26;token=7e65395e-900c-4e03-b914-1e8f60c8ee5f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

### STEP 4 : Setting up Webhooks on the Meta Develop App

As soon as the signup process on the LimeChat Helpdesk is complete, you are provided with two details

* Webhook URL
* Webhook token

The Client needs to add these details under the Webhook Configuration of their Meta Developer App that we set up in [Step 1](#step-1-setting-up-a-meta-developer-account-and-a-meta-developer-app) (See screenshot below)

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FHL6aK4VhQUtkYac6bPDA%2Fwebhook1.png?alt=media&#x26;token=a6a4b46e-b6e3-4464-89c8-32b76d55f5eb" alt=""><figcaption></figcaption></figure>

<br>

{% embed url="<https://drive.google.com/file/d/1j81swKZgQ5XLinXSh3NDUNYTbcNXPBuc/view?usp=sharing>" %}

***

## Check this video to know the complete process:

{% embed url="<https://drive.google.com/file/d/1oS5pTqgQ-q78rMvKefRZ8FfH5arRoIwI/view?usp=sharing>" %}

***

### FAQs

<details>

<summary>Why do I need a Meta Developer Account for WhatsApp Cloud API?</summary>

The Cloud API and Business Management API are part of Meta’s Graph API, so you need a Meta Developer Account to create and manage a WhatsApp Business Account (WABA) and link it with LimeChat.

</details>

<details>

<summary>What permissions are required for setting up a WhatsApp Cloud API Inbox?</summary>

You need System User Admin Access Token, WABA Phone Number, WABA Phone Number ID, and WABA Business Account ID, all of which can be found in your Meta Developer App under the WhatsApp configuration section.

</details>

<details>

<summary>How do I generate an Admin Access Token for API integration?</summary>

You can generate an Admin Access Token inside your Meta App under the System Users section. Ensure that the token has the required permissions for Business Management API and WhatsApp API.

</details>

<details>

<summary>What happens if I don't switch my Meta App to Live Mode?</summary>

If your Meta App remains in Development Mode, your API access will be restricted, and messages will not be sent or received via the WhatsApp Cloud API.

</details>

<details>

<summary>How do I configure webhooks for WhatsApp Cloud API on Meta?</summary>

Once you set up your WhatsApp Cloud API Inbox on LimeChat, you will receive:

* **Webhook URL**
* **Webhook Token**

These need to be entered inside your Meta App’s Webhook Configuration section under the WhatsApp Application Settings to receive real-time message updates.

</details>

<details>

<summary>Can I use the test phone number provided by Meta for real customer interactions?</summary>

No, the test phone number can only send unlimited messages to up to 5 pre-verified numbers. For production use, you need to register a real business phone number.

</details>

<details>

<summary>What is the role of an "Agent" in the LimeChat Helpdesk?</summary>

An agent is assigned to handle customer conversations via the WhatsApp Cloud API Inbox. You can assign multiple agents to a single inbox for managing customer queries efficiently.

</details>

<details>

<summary>What is the difference between WhatsApp Business API (360Dialog) and WhatsApp Cloud API?</summary>

* **360Dialog**: Hosted by a third-party BSP (Business Solution Provider) and requires a BSP-managed infrastructure.
* **Cloud API**: Hosted directly by Meta, offering **faster setup**, **direct API access**, and **lower costs** compared to BSP-managed solutions.

</details>

<details>

<summary>Can I use the same WABA phone number for both 360Dialog and Cloud API?</summary>

No, a WhatsApp Business API phone number can only be linked to one provider at a time. You must delete the number from 360Dialog before linking it to Cloud API.

</details>

<details>

<summary>What should I do if I face issues during webhook setup?</summary>

* Ensure the Webhook URL and Webhook Token are correctly entered in your Meta App.
* Verify that all necessary permissions are enabled for webhook events.
* Check that the Meta App is in Live Mode to receive incoming message webhooks.

</details>
