WhatsApp Integration Setup Guide
WhatsApp Integration Setup Guide
ProjKonnect — Meta WhatsApp Cloud API
Generated: September 4, 2026
Overview
You are using the Meta WhatsApp Cloud API. You will need:
- A Meta Business Account
- A Facebook Developer App (Business type)
- A WhatsApp Business phone number
- 4 secrets set in your Base44 app environment variables
PART 1 — Meta / Facebook Setup
1
Create a Meta Business Account
- Go to https://business.facebook.com
- Click "Create Account"
- Enter your business name, your name, and business email
- Complete verification steps (email, possibly phone)
2
Create a Meta Developer App
- Go to https://developers.facebook.com
- Click "My Apps" (top right) → "Create App"
- Select "Business" as the app type → click Next
- Enter an App Name (e.g.,
ProjKonnect WhatsApp) - Enter your Business Account email
- Select your Business Account from the dropdown
- Click "Create App"
3
Add WhatsApp Product to Your App
- On your app dashboard, scroll to find "WhatsApp"
- Click "Set Up" next to WhatsApp
- You'll land on the WhatsApp Getting Started page
- Under "Step 1: Select phone numbers", click "Add phone number" OR use the free Test Number Meta provides
4
Get Your Phone Number ID & Access Token
- On the WhatsApp > Getting Started page, copy the "Phone number ID" → save as
WHATSAPP_PHONE_NUMBER_ID - Copy the "WhatsApp Business Account ID" → save as
WHATSAPP_BUSINESS_ACCOUNT_ID - Under "Step 2: Send messages with the API", copy the Temporary Access Token → save temporarily as
WHATSAPP_ACCESS_TOKEN
⚠️ The Temporary Access Token expires in 24 hours. Replace it with a permanent one in Step 6.
5
Add a Real Phone Number (Skip if using test number)
- Go to WhatsApp > Phone Numbers in the left sidebar
- Click "Add Phone Number"
- Enter a real phone number (new SIM or existing business line)
- Verify via SMS or call
- Once verified, use this number's Phone Number ID going forward
6
Create a Permanent System User Token
- Go to https://business.facebook.com/settings
- Click "Users" → "System Users" in the left sidebar
- Click "Add" → name it (e.g.,
projkonnect-bot) → set role to "Admin" - Click "Generate New Token"
- Select your App from the dropdown
- Enable permissions:
whatsapp_business_messagingandwhatsapp_business_management - Click "Generate Token" → copy and save as
WHATSAPP_ACCESS_TOKEN
✅ This token does NOT expire.
7
Set Up the Webhook
- In your Meta App dashboard, go to WhatsApp > Configuration
- Under "Webhook", click "Edit"
- In "Callback URL", enter your Base44 function URL:https://api.base44.com/api/apps/YOUR_APP_ID/functions/whatsappWebhookReceiver
Find the exact URL: Base44 Dashboard → Code → Functions → whatsappWebhookReceiver → copy endpoint
- In "Verify Token", enter a secret string you make up (e.g.,
projkonnect_verify_2026) → save asWHATSAPP_VERIFY_TOKEN - Click "Verify and Save" — Meta will auto-verify your webhook
- After saving, click "Manage" next to Webhook Fields
- Subscribe to "messages" → click Subscribe
PART 2 — Base44 Secrets Setup
8
Add All 4 Secrets to Base44
Go to Base44 Dashboard → Settings → Environment Variables and add:
| Secret Name | Value | Where to get it |
|---|---|---|
| WHATSAPP_ACCESS_TOKEN | Your system user token | Step 6 |
| WHATSAPP_PHONE_NUMBER_ID | e.g., 123456789012345 | Step 4 |
| WHATSAPP_BUSINESS_ACCOUNT_ID | e.g., 987654321098765 | Step 4 |
| WHATSAPP_VERIFY_TOKEN | Your chosen secret string | Step 7 |
PART 3 — Testing
9
Test the Webhook
- In Meta App → WhatsApp > Configuration → click "Send Test Message"
- Or text your WhatsApp number from your personal phone
- Check Base44 Dashboard → Code → Functions → whatsappWebhookReceiver logs to confirm message received
10
Verify Full Flow
- Send a message like: "Explain photosynthesis"
- You should receive an AI-generated educational response back on WhatsApp
- If the topic benefits from a visual (e.g., a diagram), you'll also receive an image
PART 4 — Going Live (Production)
11
App Review (Required to message non-test numbers)
- In Meta App dashboard, go to App Review
- Request permission for:
whatsapp_business_messaging - Submit your use case description:"Educational AI tutoring bot that answers student academic questions via WhatsApp"
- Meta review takes 1–5 business days
12
Set App to Live Mode
- In Meta App dashboard, toggle from "Development" to "Live" (top of the page)
- ✅ Now any WhatsApp user can message your number
Troubleshooting
| Problem | Fix |
|---|---|
| Webhook verification fails | Check WHATSAPP_VERIFY_TOKEN matches exactly in Base44 and Meta |
| Messages not received | Ensure the 'messages' webhook field is subscribed in Meta |
| Token expired | Replace with System User permanent token (Step 6) |
| Can only message test numbers | Complete App Review (Step 11) |
| phoneNumberId error | Confirm WHATSAPP_PHONE_NUMBER_ID is set correctly in Base44 |
ProjKonnect — WhatsApp Integration Setup Guide — 2026