WhatsApp Business Integration#
Connect your WhatsApp Business account via Meta OAuth for automated messaging with full feature support.
Overview#
| Property | Value |
|---|---|
| Platform Type | WHATSAPP |
| Authentication | OAuth (Meta Login) |
| Webhook Type | Shared |
| Message Limit | 4096 characters |
Features#
- Send and receive text messages
- Rich media (images, videos, documents, audio)
- Message read receipts
- Typing indicators
- Message status tracking (sent, delivered, read)
- Interactive buttons and lists
- Message templates
- Automatic token management
Prerequisites#
- WhatsApp Business Account (not personal WhatsApp)
- Facebook Business Manager account
- Business verified with Meta
Don't have these? Follow Meta's [WhatsApp Business setup guide](https://business.facebook.com/wa/manage/home/).
Setup Guide#
Step 1: Connect via OAuth#
- In Outeract console, go to Connections → Add Connection
- Select WhatsApp Business
- Click Connect with Meta
- Log in to Facebook
- Select your WhatsApp Business Account
- Authorize Outeract to manage your WhatsApp messages
- Connection is created automatically
Step 2: Webhook Configuration#
WhatsApp uses a shared webhook architecture:
- One webhook URL handles all WhatsApp connections
- Routing is automatic based on Business Account ID
- No per-connection webhook configuration needed
The shared webhook is automatically configured when your first WhatsApp connection is created.
Step 3: Verify Connection#
mutation {
testPlatformConnection(id: "pc_whatsapp_123") {
success
message
health {
status
lastCheckedAt
}
}
}Sending Messages#
Text Message#
mutation {
sendMessage(
platformConnectionId: "pc_whatsapp_123"
toExternalId: "+14155551234"
message: "Hello! Thanks for contacting us."
) {
id
status {
success
externalMessageId
}
}
}Image Message#
mutation {
sendMessage(
platformConnectionId: "pc_whatsapp_123"
toExternalId: "+14155551234"
message: "Check out our new product!"
fileIds: ["file_xyz789"]
) {
id
}
}Document Message#
mutation {
sendMessage(
platformConnectionId: "pc_whatsapp_123"
toExternalId: "+14155551234"
message: "Here's your invoice"
fileIds: ["file_invoice123"]
) {
id
}
}Supported Message Types#
| Type | Send | Receive | Notes |
|---|---|---|---|
| Text | ✓ | ✓ | Up to 4096 characters |
| Images | ✓ | ✓ | JPEG, PNG (5MB max) |
| Videos | ✓ | ✓ | MP4, 3GPP (16MB max) |
| Audio | ✓ | ✓ | AAC, MP4, OGG (16MB max) |
| Documents | ✓ | ✓ | PDF, DOC, etc. (100MB max) |
| Stickers | ✓ | ✓ | WebP format |
| Location | ✓ | ✓ | GPS coordinates |
| Contacts | ✓ | ✓ | vCard format |
| Reactions | ✓ | ✓ | Emoji reactions |
External ID Format#
WhatsApp uses E.164 phone numbers:
| Country | Format | Example |
|---|---|---|
| US/Canada | +1XXXXXXXXXX | +14155551234 |
| UK | +44XXXXXXXXXX | +442071234567 |
| Brazil | +55XXXXXXXXXXX | +5511912345678 |
Always include the + prefix and country code.
Read Receipts & Typing#
Mark as Read#
mutation {
markMessageAsRead(
platformConnectionId: "pc_whatsapp_123"
externalMessageId: "wamid.xyz123"
) {
success
}
}Send Typing Indicator#
mutation {
sendTypingIndicator(
platformConnectionId: "pc_whatsapp_123"
toExternalId: "+14155551234"
) {
success
}
}Message Status Tracking#
Messages go through these statuses:
| Status | Description |
|---|---|
sent | Message sent to WhatsApp servers |
delivered | Delivered to recipient’s device |
read | Recipient opened the message |
failed | Delivery failed |
Query message status:
query {
event(id: "evt_abc123") {
id
payload
childEvents {
id
eventType # message.delivered, message.read
createdAt
}
}
}24-Hour Messaging Window#
WhatsApp enforces a 24-hour messaging window:
- Inside window: Send any message type freely
- Outside window: Must use pre-approved templates
The window opens when a user messages you and closes 24 hours after their last message.
Message Templates#
For messages outside the 24-hour window:
mutation {
sendTemplateMessage(
platformConnectionId: "pc_whatsapp_123"
toExternalId: "+14155551234"
templateName: "order_confirmation"
languageCode: "en_US"
parameters: [
{ type: "body", index: 1, text: "John" },
{ type: "body", index: 2, text: "#12345" }
]
) {
id
}
}Templates must be pre-approved in Meta Business Manager.
Rate Limits#
Message limits depend on your WhatsApp Business tier:
| Tier | Daily Limit | How to Upgrade |
|---|---|---|
| Tier 1 | 1,000 | Start here |
| Tier 2 | 10,000 | Good quality score |
| Tier 3 | 100,000 | Sustained quality |
| Tier 4 | Unlimited | High volume verified |
Outeract handles rate limiting automatically.
Webhook Events#
Inbound Message#
{
"event_id": "evt_abc123",
"event_type": "message.inbound",
"payload": {
"message": {
"text": "Hello!",
"role": "user"
},
"platform": "whatsapp",
"external_message_id": "wamid.xyz123"
},
"edges": {
"sent_by": {
"external_id": "+14155559999"
}
}
}Message Status Update#
{
"event_id": "evt_xyz789",
"event_type": "message.delivered",
"payload": {
"status": "delivered",
"external_message_id": "wamid.abc456"
}
}WhatsApp Business Policies#
Permitted Use#
- Customer support
- Transaction notifications
- Appointment reminders
- Order updates
Prohibited Content#
- Spam or bulk messaging without consent
- Promotional messages outside templates
- Automated messages pretending to be human
- Adult, gambling, or sensitive content
See WhatsApp Business Policy for full guidelines.
Troubleshooting#
“Phone number not registered”#
- Recipient must have WhatsApp installed
- Verify phone number is correct E.164 format
- Check if number is blocked
“Outside 24-hour window”#
- Use a message template instead
- Templates must be pre-approved in Meta Business Manager
“Rate limit exceeded”#
- Check your tier in Meta Business Manager
- Messages will queue and retry automatically
- Upgrade tier for higher limits
“Invalid phone number”#
- Ensure E.164 format (
+prefix) - Include country code
- No spaces or formatting
“Token expired”#
- OAuth tokens auto-refresh
- If issues persist, reconnect via OAuth
Security#
WhatsApp webhook signatures use HMAC-SHA256:
- Signature in
X-Hub-Signature-256header - Validated against your App Secret
- Invalid signatures are rejected