Super admin:
superadmin@wapingly.test / super1234 — plans and clients are in Platform. Meta credentials stay in .env.Client owner:
demo@wapingly.test / passwordAfter you deploy, set
APP_URL in .env to the public HTTPS address. Meta only calls HTTPS webhooks.
1. What you need from Meta
- App ID and App Secret — one Meta app for the whole Wapingly server.
- WhatsApp Business Account ID (WABA ID) — each customer workspace.
- Phone number ID — the Cloud API id, not the mobile number itself.
- Permanent access token — a System User token. The token shown in API Setup expires in 24 hours. Do not use that in production.
- Webhook verify token —
WHATSAPP_VERIFY_TOKENin.env. Default iswapingly-verify-token.
2. Create the Meta app
- Open developers.facebook.com/apps and create an app.
- Use case: Other or Business. Type: Business.
- Add the product WhatsApp.
- App settings → Basic: copy App ID. Show and copy App Secret.
- Put App ID, App Secret, Embedded Signup configuration ID, and graph version in
.env. Do not paste them into the Super Admin screen.
META_APP_ID=your_app_id META_APP_SECRET=your_app_secret META_EMBEDDED_SIGNUP_CONFIG_ID=your_config_id META_GRAPH_VERSION=v21.0 META_MANAGE_APP_WEBHOOK=0 WHATSAPP_VERIFY_TOKEN=wapingly-verify-token
META_MANAGE_APP_WEBHOOK=0 keeps this shared Meta app’s default webhook unchanged. Each client’s WABA is subscribed on its own when they connect. Clients never see the app secret. They open Settings and click Connect with Meta.
3. Add a phone number and read the IDs
- In the app, open WhatsApp → API Setup.
- You can use the test number first. Add your own mobile under To so test sends are allowed.
- Copy Phone number ID and WhatsApp Business Account ID.
- For a real business number: WhatsApp → Configuration, or Meta Business Suite → WhatsApp Accounts → Phone numbers. The Phone number ID is on that number’s detail page.
- In Wapingly go to Settings and paste Phone number ID, WABA ID, the display phone, and the access token. Save. Wapingly calls Graph and fills quality rating and messaging limit.
4. Permanent token (do this, skip the 24-hour token)
- Open Business Settings.
- Users → System users → Add. Role: Admin.
- Assign assets: your App, and the WhatsApp account. Full control.
- Generate token. Permissions:
whatsapp_business_managementwhatsapp_business_messagingbusiness_management
- Clients do not paste a token. Connect with Meta exchanges the popup code and stores that client’s token, phone number ID, and WABA ID.
5. Webhook
Wapingly has one webhook for every workspace. Meta posts the message, and Wapingly matches phone_number_id to the right customer.
- Callback URL:
https://YOUR-DOMAIN/webhook/whatsapp - Verify token: the same string as
WHATSAPP_VERIFY_TOKEN(defaultwapingly-verify-token). - In the Meta app: WhatsApp → Configuration → Webhook → Edit. Click Verify and save.
- Subscribe to the field messages. Also subscribe message_template_status_update so template approval updates itself.
- In Wapingly Settings, after the token is saved, the app also subscribes that WABA (
POST /{waba-id}/subscribed_apps).
APP_URL to that HTTPS origin. http://localhost will verify in the browser and fail inside Meta.
6. Embedded signup (optional)
This is the “Connect with Meta” button. Each customer connects their own WhatsApp account without pasting a token.
- Meta app → Facebook Login for Business → Configurations → Create configuration.
- Login variation: WhatsApp Embedded Signup.
- Copy the Configuration ID into
META_EMBEDDED_SIGNUP_CONFIG_IDin.env. - Valid OAuth redirect: your site origin, for example
https://your-domain.com/. - A client opens Settings. The green Connect with Meta button appears. Finish the popup. Wapingly exchanges the code for a token, stores that client’s WABA and phone number id, subscribes the webhook, and syncs templates.
7. Templates and the 24-hour rule
- Create a template in Wapingly → Message Templates, or in WhatsApp Manager. Name must be
lowercase_with_underscores. - Marketing templates stay PENDING until Meta approves them. Click Sync templates.
- Campaigns can only use APPROVED templates.
- A free-text reply works only for 24 hours after the customer’s last inbound message. Outside that window, send a template. Wapingly blocks session text and shows the reason.
- If Meta says the number is not in the allowed list, add it under API Setup → To, or let that person message the business first.
8. App review and a real number
- Test number: you can message only numbers you added as recipients. Enough to prove send, inbox, and templates.
- Live number: complete Business Verification in Meta Business Suite, then App Review for
whatsapp_business_messagingandwhatsapp_business_managementif the app is in Development mode and other businesses will connect. - Display name must match the business. Rejected names stay in
name_statusuntil you fix them in WhatsApp Manager. - Quality rating (High / Medium / Low) and the daily limit (250, 1,000, 10,000…) come from Meta. Wapingly reads them from the phone-number endpoint when you refresh Settings.
- Registering a new Cloud API number needs the 6-digit two-step PIN. Settings → Register number sends
POST /{phone-number-id}/register.
9. Where each value goes in Wapingly
- App ID, App Secret, Embedded Signup Config ID, graph version,
META_MANAGE_APP_WEBHOOK=0→.envonly. One app for every client. - Phone number ID, WABA ID, access token → created when that client clicks Connect with Meta. Not typed by hand.
- Plans ₹499 / ₹999 / ₹1,499 / ₹1,999 → Plans page. Add
RAZORPAY_KEY_IDandRAZORPAY_KEY_SECRETwhen you want real checkout. Without those keys, Buy now activates the plan locally and does not charge a card. - API for your own apps → Developer → create a token, then
POST /api/v1/messageswithAuthorization: Bearer TOKEN.
10. First successful send
- Sign in as a client, open Settings, and click Connect with Meta.
- Confirm the green profile card on the dashboard shows a display name and quality rating.
- Sync templates. Wait until one is APPROVED.
- Add a contact with country code, for India
98xxxxxxxxis stored as91.... - Ask that person to send “hi” to the business number so the 24-hour window opens, or send the approved template from Inbox or Campaigns.
- The reply should land in Inbox within a few seconds once the webhook is public.
Server notes
- Database is SQLite at
database/database.sqlite. For MySQL, switchDB_CONNECTIONin.envand run migrations again. - Gallery files:
php artisan storage:link. - Scheduled campaigns and drips: run
php artisan wapingly:runevery minute (Windows Task Scheduler or cron). - Sending uses the
netflie/whatsapp-cloud-apiSDK. Templates, profile, webhooks and signup use the Graph API directly.