Wapingly

Meta app setup for WhatsApp Cloud API

Yeh guide sirf platform Super Admin ke liye hai. Meta app ek baar banti hai aur publish hoti hai. Har client apna developer app nahi banata. Client Wapingly me subscription leta hai, Connect with Meta se apna WhatsApp number jodta hai, aur chats, templates, campaigns isi dashboard me chalta hai.

Open the product: http://localhost/wapingly/public
Super admin: superadmin@wapingly.test / super1234 — plans and clients are in Platform. Meta credentials stay in .env.
Client owner: demo@wapingly.test / password
After you deploy, set APP_URL in .env to the public HTTPS address. Meta only calls HTTPS webhooks.

1. What you need from Meta

2. Create the Meta app

  1. Open developers.facebook.com/apps and create an app.
  2. Use case: Other or Business. Type: Business.
  3. Add the product WhatsApp.
  4. App settings → Basic: copy App ID. Show and copy App Secret.
  5. 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

  1. In the app, open WhatsApp → API Setup.
  2. You can use the test number first. Add your own mobile under To so test sends are allowed.
  3. Copy Phone number ID and WhatsApp Business Account ID.
  4. 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.
  5. 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)

  1. Open Business Settings.
  2. Users → System users → Add. Role: Admin.
  3. Assign assets: your App, and the WhatsApp account. Full control.
  4. Generate token. Permissions:
    • whatsapp_business_management
    • whatsapp_business_messaging
    • business_management
  5. 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.
The token from WhatsApp → API Setup is temporary. Campaigns stop the next day if you paste that one.

5. Webhook

Wapingly has one webhook for every workspace. Meta posts the message, and Wapingly matches phone_number_id to the right customer.

  1. Callback URL: https://YOUR-DOMAIN/webhook/whatsapp
  2. Verify token: the same string as WHATSAPP_VERIFY_TOKEN (default wapingly-verify-token).
  3. In the Meta app: WhatsApp → Configuration → Webhook → Edit. Click Verify and save.
  4. Subscribe to the field messages. Also subscribe message_template_status_update so template approval updates itself.
  5. In Wapingly Settings, after the token is saved, the app also subscribes that WABA (POST /{waba-id}/subscribed_apps).
Local XAMPP cannot receive webhooks. Meta’s servers must reach a public HTTPS URL. Use a tunnel (Cloudflare Tunnel or ngrok) or deploy the site, then set 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.

  1. Meta app → Facebook Login for Business → Configurations → Create configuration.
  2. Login variation: WhatsApp Embedded Signup.
  3. Copy the Configuration ID into META_EMBEDDED_SIGNUP_CONFIG_ID in .env.
  4. Valid OAuth redirect: your site origin, for example https://your-domain.com/.
  5. 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

8. App review and a real number

  1. Test number: you can message only numbers you added as recipients. Enough to prove send, inbox, and templates.
  2. Live number: complete Business Verification in Meta Business Suite, then App Review for whatsapp_business_messaging and whatsapp_business_management if the app is in Development mode and other businesses will connect.
  3. Display name must match the business. Rejected names stay in name_status until you fix them in WhatsApp Manager.
  4. 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.
  5. 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

10. First successful send

  1. Sign in as a client, open Settings, and click Connect with Meta.
  2. Confirm the green profile card on the dashboard shows a display name and quality rating.
  3. Sync templates. Wait until one is APPROVED.
  4. Add a contact with country code, for India 98xxxxxxxx is stored as 91....
  5. 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.
  6. The reply should land in Inbox within a few seconds once the webhook is public.

Server notes