WhatsApp Business API

Webhook Integration

Endpoint Ready
Use this URL in your Meta Developer Console webhook configuration
https://your-domain.vercel.app/api/webhook/whatsapp
Setup Instructions
Follow these steps to connect your WhatsApp Business account

1Create a Meta App

Go to developers.facebook.com and create a new app with WhatsApp Business product.

2Configure Webhook

In your Meta App Dashboard, go to WhatsApp → Configuration → Webhook and enter your webhook URL.

3Set Environment Variables

Add these environment variables to your Vercel project:

WHATSAPP_VERIFY_TOKEN

Your custom verification token (must match Meta console)

WHATSAPP_TOKEN

Permanent access token from Meta Developer Console

WHATSAPP_PHONE_NUMBER_ID

Your WhatsApp Business phone number ID

4Subscribe to Webhook Fields

In the webhook configuration, subscribe to messages field to receive incoming messages.

Supported Features
This webhook handles the following WhatsApp events

Text Messages

Receive and process text messages

Media Messages

Images, audio, video, documents

Location Sharing

Receive location data

Interactive Messages

Button and list responses

Status Updates

Sent, delivered, read receipts

Template Messages

Send pre-approved templates

Check the server logs for incoming webhook events