WhatsApp Business API
Webhook Integration
https://your-domain.vercel.app/api/webhook/whatsapp1Create 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_TOKENYour custom verification token (must match Meta console)
WHATSAPP_TOKENPermanent access token from Meta Developer Console
WHATSAPP_PHONE_NUMBER_IDYour WhatsApp Business phone number ID
4Subscribe to Webhook Fields
In the webhook configuration, subscribe to messages field to receive incoming messages.
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