Features
- Official Meta WhatsApp Business API
- Text messaging with formatting
- Interactive buttons (up to 3)
- Interactive lists
- Template messages
- Media messages (image, video, audio, document)
- Location messages
- Contact cards
- WhatsApp Flows
- Product catalog messages
- Reactions
- Read receipts
- Typing indicators
- Message queuing for rate limiting
Prerequisites
Meta Business Account
Create a Meta Business Account at business.facebook.com
Get Credentials
Obtain your:
- Phone Number ID (
numberId) - Access Token (
jwtToken) - Verify Token (
verifyToken)
Installation
Configuration
Basic Setup
Environment Variables
Basic Usage
Sending Text Messages
Sending Media
Interactive Messages
Buttons
WhatsApp limits:
- Maximum 3 buttons per message
- Button text: max 20 characters
Lists
URL Buttons
Template Messages
Template messages must be pre-approved by Meta.Advanced Features
Sending Location
Requesting Location
Sending Contacts
Reactions
Typing Indicator
Mark as Read
WhatsApp Flows
WhatsApp Flows enable rich, multi-step experiences.Product Catalog
Webhook Configuration
Webhook Endpoints
The provider automatically sets up webhook endpoints:Meta Webhook Setup
- Go to your WhatsApp Business App settings
- Set webhook URL:
https://your-domain.com/webhook - Set verify token (matches your
verifyTokenconfig) - Subscribe to message events
Saving Files
Rate Limiting
The Meta provider includes built-in message queueing:Error Handling
Best Practices
Template Messages
Template Messages
- Get templates pre-approved by Meta
- Use templates for proactive messaging
- Regular messages only work within 24-hour window after user message
Phone Number Formatting
Phone Number Formatting
- The provider auto-formats numbers
- Argentina (549) and Mexico (521) prefixes are automatically corrected
- Always include country code
Rate Limits
Rate Limits
- Meta enforces rate limits based on your tier
- Start with lower tier and request increases
- Monitor message delivery status
Media Files
Media Files
- Host media on HTTPS URLs
- Or upload directly via the API
- Supported formats: JPEG, PNG, MP4, PDF, MP3, etc.
Troubleshooting
Invalid Token Error
Invalid Token Error
- Verify
META_ACCESS_TOKENis correct - Check token hasn’t expired
- Ensure token has proper permissions
Webhook Not Receiving Messages
Webhook Not Receiving Messages
- Verify webhook URL is publicly accessible (HTTPS required)
- Check verify token matches
- Review Meta webhook logs in Developer Console
Template Rejected
Template Rejected
- Follow Meta’s template guidelines
- Avoid promotional content in utility templates
- Wait for approval before using