# WhatsApp Inbound Calling

> Connect your WhatsApp Business account to Edesy so your AI voice agent can answer inbound WhatsApp calls.

Source: https://edesy.in/docs/voice-agent/telephony/whatsapp

> **Talk to us to enable.** WhatsApp calling is set up with our team for each number today, not self-serve. Use this guide to prepare your Meta account, then contact [support@edesy.in](mailto:support@edesy.in). Overview: [WhatsApp calling](https://edesy.in/docs/voice-agent/channels/whatsapp-calling).

> **Looking for an overview first?** See the [WhatsApp Voice AI product page](https://edesy.in/whatsapp-voice-ai) for use cases, pricing, language support, and competitor comparisons. This page is the technical setup guide.

This guide walks you through connecting your WhatsApp Business account to Edesy so your voice agent can pick up incoming WhatsApp calls and have a real-time conversation with the caller — no separate phone line required.

WhatsApp Business Calling is a great fit when:

- Your customers already reach you on WhatsApp, and you want a 24/7 AI agent on the same number
- You want to avoid setting up a Twilio / Plivo / Exotel account just to handle inbound voice
- You operate in regions where WhatsApp is the dominant communication channel

---

## Prerequisites

Before you begin, make sure you have:

- A **Facebook account** (a personal account is fine — Meta Business Manager and the WhatsApp Business Account are created automatically when you set up the app)
- A **phone number that is not already registered on WhatsApp**. A virtual / VoIP number from providers like Twilio, Plivo, or Vonage works
- An **Edesy workspace** with at least one voice agent configured. If you haven't built an agent yet, see [Creating an Agent](https://edesy.in/docs/voice-agent/agent-setup)

> **No Meta Business Manager account required upfront.** When you create an app with the WhatsApp use case, Meta automatically creates a Test WhatsApp Business Account and a Business Portfolio for you.

---

## Step 1: Create a Meta Developer App

1. Go to [developers.facebook.com/apps](https://developers.facebook.com/apps) and log in with your Facebook account
2. Click **Create App**
3. Enter your **App name** and **App contact email**, then click **Next**

![App details screen — enter app name and contact email](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-app-details.png)

4. On the **Use cases** screen, select **Connect with customers through WhatsApp** and click **Next**

![Use cases screen — select Connect with customers through WhatsApp](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-use-case-selection.png)

5. On the **Business** screen, select your existing business portfolio or click **Create a business portfolio** to create a new one, then click **Next**

![Business screen — select or create a business portfolio](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-business-portfolio.png)

If you create a new portfolio, fill in the basic details in the modal:

![Create business portfolio modal](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-create-portfolio-modal.png)

6. The **Requirements** screen shows any publishing requirements — at this stage there are usually none. Click **Next**

![Publishing requirements screen](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-publishing-requirements.png)

7. Review your app summary on the **Overview** screen and click **Create app**

![Overview screen — review and create the app](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-app-overview-confirm.png)

After creation you are redirected to the app **Dashboard**, which shows your app customization checklist.

![App dashboard after creation](https://edesy.in/images/voice-agent/telephony/whatsapp/step1-app-dashboard.png)

---

## Step 2: Find Your Phone Number ID and WABA ID

Navigate to **Use cases** in the left sidebar. Click the **Customize** button on the **Connect with customers through WhatsApp** use case. You'll land on the **Overview** page showing the guided 3-step setup flow.

![Use case overview — guided setup with 3 steps](https://edesy.in/images/voice-agent/telephony/whatsapp/step2-use-case-overview.png)

![Use case setup overview](https://edesy.in/images/voice-agent/telephony/whatsapp/step2-setup-overview.png)

Click **Step 1. Try it out** in the left sidebar. You'll see your automatically created test number with two important IDs:

- **Phone Number ID** — shown next to your test number
- **WhatsApp Business Account ID (WABA ID)** — shown to the right of the Phone Number ID

![Step 1 Try it out — test number with Phone Number ID and WABA ID](https://edesy.in/images/voice-agent/telephony/whatsapp/step2-try-it-out-phone-number-id.png)

Copy and save both of these — you'll need them later.

> **Using your own number instead of the test number?** Go to **Step 2. Production setup → Register your WhatsApp phone number** and follow the OTP verification steps.

---

## Step 3: Generate a Permanent Access Token

The **Generate token** button on the Step 1 page creates a temporary token that expires quickly. For production use, generate a permanent token via a System User.

### 3a. Create a System User

1. Go to [business.facebook.com/latest/settings](https://business.facebook.com/latest/settings) → click **System users** under the **Users** section in the sidebar
2. Click **+ Add** in the top-right corner → give the system user a name → set role to **Admin** → click **Create System User**

### 3b. Assign Assets to the System User

3. Select the new system user → click the **⋯** menu → click **Assign assets**

![System user detail panel — click the ⋯ menu to access Assign assets](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-system-user-assign-assets-menu.png)

4. In the **Select assets and assign permissions** modal, click **Apps** on the left, select your app, then enable **Manage app** under **Full control**, and click **Assign assets**

![Assign assets — Apps tab with Manage app Full control enabled](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-assign-assets-app-full-control.png)

5. Open **Assign assets** again, this time click **WhatsApp accounts** on the left, select your WABA, then enable **Everything** under **Full control**, and click **Assign assets**

![Assign assets — WhatsApp accounts tab with Everything Full control enabled](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-assign-assets-whatsapp-full-control.png)

You should now see both the app and the WhatsApp account listed under the system user's **Assigned assets** tab. You may need to refresh the page to see updated data.

![System user assigned assets — app and WhatsApp accounts both with Full control](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-system-user-assigned-assets.png)

### 3c. Generate the Token

6. Click **Generate token** on the system user panel
7. **Select app** — choose your app from the dropdown, then click **Next**

![Generate token — Step 1: select the app](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-generate-token-select-app.png)

8. **Set expiration** — select **Never** so the token does not expire, then click **Next**

![Generate token — Step 2: set expiration to Never](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-generate-token-set-expiry.png)

9. **Assign permissions** — check both of the following, then click **Generate token**:
   - `whatsapp_business_management`
   - `whatsapp_business_messaging`

![Generate token — Step 3: assign whatsapp_business_management and whatsapp_business_messaging permissions](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-generate-token-assign-permissions.png)

10. **Copy the token shown and store it securely** — you will not be able to see it again.

You can verify the app is correctly linked by checking the **Installed apps** tab on the system user:

![System user — Installed apps tab confirming the app is linked](https://edesy.in/images/voice-agent/telephony/whatsapp/step3-system-user-installed-apps.png)

---

## Step 4: Configure Webhooks

1. In your app dashboard, go to **Use cases → Customize → Step 2. Production setup**
2. Under **Configure Webhooks**, enter the **Callback URL** and **Verify token**
3. **Callback URL:**

   ```
   https://voice-agent.edesy.in/api/webhooks/whatsapp?agent_id=<AGENT_ID>
   ```

   Replace `<AGENT_ID>` with the ID of the agent that should answer these calls. You can find your Agent ID by opening the agent in the [Edesy Dashboard](https://voice-agent.edesy.in) — it appears in the URL: `voice-agent.edesy.in/agents/{AGENT_ID}`.

4. **Verify Token:**

   ```
   edesy-whatsapp-webhook-verification-token
   ```

   Use this exact value — it is the verify token Edesy uses for all WhatsApp integrations.

5. Click **Verify and save**

![Step 2 Production setup — Configure Webhooks with Callback URL, Verify token, and Webhook fields](https://edesy.in/images/voice-agent/telephony/whatsapp/step4-webhook-configuration.png)

6. Once verified, scroll down to the **Webhook fields** table and make sure the following are toggled to **Subscribed**:
   - `messages`
   - `calls`

> **Important:** Apps only receive test webhooks while unpublished. No production data is delivered until you publish your app. While you're still testing, add yourself as a Tester under **App roles** so you can receive webhooks during development.

7. Subscribe your app to your WABA by running this API call from your terminal or any HTTP client:

```bash
curl -X POST https://graph.facebook.com/v25.0/<WABA_ID>/subscribed_apps \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
```

You should receive `{ "success": true }` in response.

> **Why is this extra step needed?** The dashboard webhook configuration registers your URL, but the WABA-to-app subscription is a separate link that must be explicitly created. Without it, Meta verifies your webhook but never actually delivers call events to it.

---

## Step 5: Enable Calling on Your Phone Number

Run the following API call to enable calling and callback permissions on your number:

```bash
curl -X POST https://graph.facebook.com/v25.0/<PHONE_NUMBER_ID>/settings \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "calling": {
      "status": "ENABLED",
      "callback_permission_status": "ENABLED"
    }
  }'
```

Verify it worked:

```bash
curl -X GET https://graph.facebook.com/v25.0/<PHONE_NUMBER_ID>/settings \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
```

You should see `"status": "ENABLED"` inside the `calling` object of the response.

> **What is `callback_permission_status`?** When enabled, any user who calls your business number automatically grants your business permission to call them back for 7 days. This is required if you ever want to enable business-initiated (outbound) WhatsApp calls in the future.

---

## Step 6: Add Your Credentials in the Edesy Dashboard

Now connect your WhatsApp credentials to Edesy:

1. Open the [Edesy Dashboard](https://voice-agent.edesy.in)
2. Go to **Phone Numbers**
3. Click **Add Credential** (or **Add Number**) and select **WhatsApp** as the provider
4. Fill in the three fields:

| Field | Where to find it |
|---|---|
| **Phone Number** | Use cases → Customize → Step 1. Try it out (the actual phone number string) |
| **Phone Number ID** | Use cases → Customize → Step 1. Try it out (the numeric ID next to the number) |
| **Access Token** | The permanent System User token generated in [Step 3](#step-3-generate-a-permanent-access-token) |

5. **Save** the credential.
6. In the credential's **Inbound Webhook** card, pick the agent you want to handle inbound WhatsApp calls and click **Save**.

That's it. When you link an agent, Edesy automatically configures the per-number webhook on Meta's side so calls to your WhatsApp number route to the agent you selected — you don't need to copy any URL manually after Step 4.

> **Tip:** You can change which agent answers calls anytime by editing the same Inbound Webhook setting. Edesy will reprogram the webhook on Meta automatically.

---

## Testing Your Integration

1. **Add your personal WhatsApp number as a test recipient.**
   In the Meta dashboard, go to **Step 1. Try it out** → under **Send a message from your test number** → add your personal phone number as a recipient.

2. **Save the test business number in your phone's contacts.** This is required for WhatsApp to show the call option.

3. **Place a WhatsApp voice call from your phone to the test business number.** Your agent should pick up and start the conversation.

> **WhatsApp calling only works from a mobile device** — WhatsApp Web and Desktop apps cannot place WhatsApp voice calls.

---

## Troubleshooting

### Not receiving webhooks after a call

- Confirm `calls` is toggled **Subscribed** in the Webhook fields section of *Step 2. Production setup*
- Confirm your app is subscribed to the WABA via the API call in [Step 4](#step-4-configure-webhooks)
- Make sure your webhook URL is correctly configured with `?agent_id=<AGENT_ID>`

### Call connects but the agent doesn't answer

- In the Edesy Dashboard, go to **Phone Numbers**, open your WhatsApp credential, and confirm an agent is selected under **Inbound Webhook**
- Check that the selected agent is in **Active** status
- Verify your workspace has sufficient credits — see [Billing & Credits](https://edesy.in/docs/voice-agent/billing)

### Calling not working despite being enabled in the UI

- Verify via the settings GET call (Step 5) that `"status": "ENABLED"` is returned in the `calling` object — the dashboard toggle can occasionally disagree with the actual server-side state
- Re-run the `POST /<PHONE_NUMBER_ID>/settings` call from Step 5 to force the state

### Outbound calls fail with a permission error

- The user has not granted call-back permission. Make sure `callback_permission_status` is **ENABLED** and that the user has called your number at least once in the last 7 days

### Authentication / "code 190" errors

- Your access token has expired or been revoked. Regenerate it using the System User flow in [Step 3](#step-3-generate-a-permanent-access-token), then update the credential in the Edesy Dashboard

---

## Going to Production

The test phone number and test WABA are sufficient for development. When you're ready for production:

1. **Complete Meta Business Verification** at [business.facebook.com/latest/settings](https://business.facebook.com/latest/settings) → **Business info → Start Verification** (takes 1–14 business days)
2. **Register your production phone number** under **Use cases → Customize → Step 2. Production setup → Register your WhatsApp phone number**. Virtual numbers from Twilio, Plivo, or Vonage work well
3. **Add a payment method** under **Step 2. Production setup → Add payment** to enable business-initiated messaging
4. **Publish your app** via the **Publish** button in the left sidebar of the Meta Developer Dashboard

> **For business-initiated (outbound) calls:** your account must reach a messaging tier of 2,000 unique users/day — this builds up over time as you send messages.
>
> **User-initiated (incoming) calls have no messaging tier requirement** and work in production as soon as business verification is complete.

---

## Next Steps

- [Creating an Agent](https://edesy.in/docs/voice-agent/agent-setup) — Build the agent that will handle your WhatsApp calls
- [System Prompt Configuration](https://edesy.in/docs/voice-agent/agent-setup/system-prompt) — Tune your agent's behaviour and tone
- [Variables & Templates](https://edesy.in/docs/voice-agent/features/variables) — Personalise conversations with caller-specific data
- [Telephony Providers Guide](https://edesy.in/docs/voice-agent/phone-numbers/providers-guide) — Compare WhatsApp with Twilio, Plivo, and other channels
- [BYOP Setup](https://edesy.in/docs/voice-agent/phone-numbers/byop) — Add traditional phone numbers alongside WhatsApp
