Documentation Menu
Back to Channels

WhatsApp Business API Setup

Enterprise messaging via Meta Business API

Overview

Meta Business Account Required

This integration requires a Meta Business account and is designed for the WhatsApp Business API only. Consumer WhatsApp or WhatsApp Business App accounts cannot be used with this integration.

The WhatsApp Business API integration enables SingularCore to send and receive messages through WhatsApp using Meta's official Business API. This is designed for enterprise use cases and requires proper business verification.

Difficulty

Advanced

Setup Time

1-2 hours

Notification Tiers

Normal, High, Urgent

Prerequisites

  • Meta Business account (business.meta.com)
  • Business verification completed
  • Valid phone number (not already on WhatsApp)
  • HTTPS webhook endpoint

Step-by-Step Setup

1

Create Meta Business Account

  1. Go to business.meta.com
  2. Click "Create Account" and complete registration
  3. Verify your business email address
  4. Complete business verification (may take 24-48 hours)
  5. Note your Business ID from Settings
2

Set Up WhatsApp Business Account

  1. In Meta Business Manager, go to "Accounts" → "WhatsApp Accounts"
  2. Click "Add WhatsApp Business Account"
  3. Choose "Create a new WhatsApp Business Account"
  4. Enter a display name for your WhatsApp Business Profile
  5. Add a phone number (must not be on WhatsApp already)
  6. Verify the phone number via SMS or voice call
3

Get API Credentials

  1. Go to developers.facebook.com and select your app
  2. Navigate to "WhatsApp" → "Get Started"
  3. Copy the Phone Number ID
  4. Copy the WhatsApp Business Account ID
  5. Go to "App Dashboard" → "WhatsApp" → "API Setup"
  6. Generate a Permanent Access Token with whatsapp_business_messaging permission
4

Configure Webhook

In Meta Business Manager:

  1. Go to your WhatsApp Business Account → Configuration
  2. Click "Edit" under Webhooks
  3. Enter your webhook URL: https://your-domain.com/webhook/whatsapp
  4. Enter a verification token (create a secure random string)
  5. Subscribe to messages events
  6. Click "Verify and Save"

Required: Your webhook endpoint must respond to the verification challenge with the hub.challenge parameter.

5

Configure Bot

Edit config/comms.json:

{
  "whatsapp": {
    "enabled": true,
    "phone_number_id": "123456789012345",
    "business_account_id": "987654321098765",
    "access_token": "EAAB...",
    "webhook_secret": "your-webhook-verification-token",
    "allowed_phone_numbers": ["+1234567890", "+0987654321"],
    "api_version": "v17.0"
  }
}

Supported Commands

CommandDescriptionTier
statusSystem health check0
skillsList available skills0
dreamView last dream summary0
approve <id>Approve pending action1+
reject <id>Reject pending action1+
(text)Submit as goal1+

Troubleshooting

Webhook Not Verifying

  • Ensure webhook endpoint is HTTPS
  • Check webhook returns hub.challenge in response
  • Verify webhook_secret matches in config and Meta
  • Check server logs for verification requests

Messages Not Sending

  • Verify access token has not expired
  • Check phone_number_id is correct
  • Ensure phone number is registered and verified
  • Review Meta Business account for policy violations

Rate Limiting

  • WhatsApp Business API has rate limits per phone number
  • Monitor API usage in Meta Business Manager
  • Implement retry logic with exponential backoff

Need More Details?

View Meta's official WhatsApp Business API documentation for complete API reference, rate limits, and best practices.

Meta WhatsApp Business API Docs