Skip to main content

WhatsApp Connection

Kaanha AI connects to WhatsApp using the official Meta Cloud API — the same infrastructure WhatsApp uses for enterprise messaging. This means full compliance, template support, and access to all WhatsApp Business features.

Prerequisites

Before you start, you’ll need:
  • A Meta Business Accountbusiness.facebook.com
  • A WhatsApp Business Account (WABA) — approved by Meta
  • A verified phone number registered in your WABA
  • A Meta App with WhatsApp product added

Configuration Steps

  1. Navigate to Settings → Cloud API in your Kaanha AI dashboard
  2. Fill in the following credentials:
FieldWhere to Find
Phone Number IDMeta Business Manager → WhatsApp → Phone Numbers
Business Account IDMeta Business Manager → WhatsApp → Settings
Access TokenMeta App Dashboard → System Users → Generate Token
App SecretMeta App Dashboard → Settings → Basic
Webhook Verify TokenCreate any random string (e.g., kaanha_verify_abc123)
  1. Click Test Connection — you’ll see a green ✓ if credentials are valid
  2. Configure the Webhook in Meta Business Manager:
    • URL: https://app.kaanha.ai/api/webhooks/whatsapp
    • Verify Token: (the token you set in step 2)
    • Subscribe to events: messages, message_deliveries, message_reads, message_echoes

Meta App Permissions Required

Your Meta App must have the following permissions approved:
  • whatsapp_business_messaging
  • whatsapp_business_management

WhatsApp Compliance

Kaanha AI enforces Meta’s messaging policies automatically on every message:
  • Opt-in enforcement — All outbound messages check Contact.optedIn before sending
  • 24-hour window — Template messages required for new conversations or after 24h inactivity
  • Rate limiting — 20 messages/hour per recipient (Meta policy)
  • STOP keyword — Contacts replying STOP / UNSUBSCRIBE are automatically opted out
  • Broadcast safeguards — Frequency cap prevents marketing spam

Instagram DM (Optional)

You can also receive and reply to Instagram Direct Messages from the same chat inbox.
  1. Go to Settings → Instagram
  2. Enter your Instagram credentials:
    • Access Token (from Meta Business Manager)
    • Business Account ID
    • Page ID (connected Facebook Page)
    • Webhook Verify Token
  3. Configure webhook in Meta: https://app.kaanha.ai/api/webhooks/instagram
  4. Toggle Instagram Enabled
Instagram DM credentials are encrypted at rest using AES-256-GCM.