WhatsApp
WhatsApp setup
Connect wakit to the WhatsApp Cloud API via a Meta App.
Each wakit deployment requires its own dedicated Meta App. You cannot share a Meta App between multiple deployments.
1. Create a Meta App
- Go to developers.facebook.com/apps
- Click Create App
- Select: Use case → Connect with customers through WhatsApp, App type → Business
- Add the WhatsApp product
2. Create a system user
- Go to Meta Business Suite > Settings > System users
- Add an admin system user
- Copy the ID →
META_SYSTEM_USER_ID - Assign your app with full control
- Generate a token with permissions:
business_managementwhatsapp_business_messagingwhatsapp_business_management
- Copy the Access Token →
META_SYSTEM_USER_ACCESS_TOKEN
3. Get app credentials
In the App Dashboard > App settings > Basic:
- App ID →
META_APP_ID - App secret →
META_APP_SECRET
4. Configure the webhook
In the App Dashboard > WhatsApp > Configuration:
- Callback URL:
https://{SUPABASE_PROJECT_ID}.supabase.co/functions/v1/whatsapp-webhook - Verify token: choose a secure value →
WHATSAPP_VERIFY_TOKEN - Click Verify and save
Subscribe to these webhook fields:
messagesaccount_updatehistorysmb_message_echoessmb_app_state_sync
5. Set Edge Function secrets
Add these secrets in Supabase > Edge Functions > Secrets:
| Secret | Value |
|---|---|
META_APP_ID | Your App ID |
META_APP_SECRET | Your App Secret |
META_SYSTEM_USER_ID | System User ID |
META_SYSTEM_USER_ACCESS_TOKEN | System User Token |
WHATSAPP_VERIFY_TOKEN | Your chosen verify token |
6. Configure Facebook Login for Business
For Embedded Signup to work:
- In the App Dashboard, go to Facebook Login for Business > Configurations
- Create a new configuration: WhatsApp Embedded Signup
- Note the Configuration ID → used as
VITE_FB_LOGIN_CONFIG_IDin the UI - Go to Facebook Login for Business > Settings:
- Enable Login with the JavaScript SDK
- Add your domain to Allowed Domains for the JavaScript SDK
7. App Review
For production use, request Advanced Access for:
whatsapp_business_managementwhatsapp_business_messaging
Your Meta Business must be verified first. Submit via Review > App Review in the App Dashboard.