Integrate WhatsApp Business API into Your Mobile App
We integrate WhatsApp Cloud API into mobile applications — from server logic to user interface. This is not about installing the WhatsApp Business App on a phone, but connecting to Meta's Cloud API with pre-approved templates, webhooks, and business account verification. Our team has 5+ years of experience: hundreds of successful integrations, handling up to 500 messages per second, with an average response time under 200 ms.
Typical scenario: a client wants to send order status notifications via WhatsApp and receive incoming messages from users. Without proper architecture, you risk getting your account blocked due to Meta policy violations. We help avoid this, saving up to 70% on bulk messaging compared to SMS.
How WhatsApp Cloud API Integration Works
Meta moved the API to the cloud — no need to host your own server. Sending a message is done via a POST request to the Graph API:
POST https://graph.facebook.com/v19.0/{PHONE_NUMBER_ID}/messages Authorization: Bearer {ACCESS_TOKEN} Content-Type: application/json { "messaging_product": "whatsapp", "to": "380991234567", "type": "template", "template": { "name": "order_shipped", "language": { "code": "ru" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Ivan" }, { "type": "text", "text": "#98765" }, { "type": "text", "text": "today from 14:00 to 18:00" } ] } ] } } Templates (template) are mandatory for initial outbound messages. Free-form text can only be sent within 24 hours after the user's last message (service window). Each template is reviewed by Meta and typically approved in 1–3 business days. We ensure all templates pass moderation on the first try if policies are followed.
Template Categories and Restrictions
| Category | Examples | Marketing Restrictions |
|---|---|---|
UTILITY |
Order status, OTP, payment reminder | None |
AUTHENTICATION |
Verification code | Strict format |
MARKETING |
Promotions, offers | Opt-in required |
Marketing templates require explicit user consent. Sending without opt-in violates Meta policy and risks account suspension. We always implement a consent collection mechanism directly in the app.
Cloud API vs On-Premises: Which to Choose?
| Characteristic | Cloud API | On-Premises |
|---|---|---|
| Hosting | Meta | Your server |
| Updates | Automatic | Manual |
| Scaling | Elastic | Limited |
| Time to launch | Days | Weeks |
| Cost | Per message | + infrastructure |
Cloud API launches 3 times faster than On-Premises due to no need for own infrastructure. For most projects, we recommend Cloud API.
How to Set Up Webhooks for Incoming Messages?
Webhooks (callbacks) are key to receiving user messages and delivery statuses. Setup involves these steps:
- Create an endpoint on your server that accepts POST requests.
- Register the URL in Meta Developer Console.
- Handle the GET verification request (
hub.challenge). - Set up processing of incoming messages and statuses.
The backend receives a POST like:
// Incoming message from user { "entry": [{ "changes": [{ "value": { "messages": [{ "from": "380991234567", "type": "text", "text": { "body": "When will delivery happen?" }, "timestamp": "1711440000" }] } }] }] } // Delivery status of outbound message { "statuses": [{ "id": "wamid.XXXXX", "status": "delivered", "timestamp": "1711440060", "recipient_id": "380991234567" }] } Important: the endpoint must respond to POST in under 5 seconds — otherwise Meta will retry and eventually deactivate the webhook. We design the endpoint with asynchronous processing to meet the timeout. According to WhatsApp Cloud API documentation, the timeout must not exceed 5 seconds.
Why Is the 24-Hour Window Critical?
WhatsApp Cloud API allows sending free-form messages only within 24 hours after the user's last incoming message. After that window, only template messages can be sent. If this is ignored, the user won't get a timely response, degrading the customer experience. The mobile app should display the window status and prompt the operator to choose a template if the window is closed.
// iOS — loading conversation history struct WhatsAppConversation: Identifiable, Decodable { let id: String let contactPhone: String let contactName: String? let lastMessage: WhatsAppMessage let unreadCount: Int let windowExpiresAt: Date? // 24-hour window } // Displaying window status var isWithinServiceWindow: Bool { guard let expires = windowExpiresAt else { return false } return Date() < expires } If isWithinServiceWindow == false — the UI should show a warning that free-form messaging is not possible, and suggest choosing a template.
Business Account Verification
WhatsApp Business API requires a verified Business Manager in Meta. The process: create Meta Business Manager → verify business (documents) → create WhatsApp Business Account → get a phone number. The number cannot be used simultaneously in WhatsApp Business App — only in API.
Verification takes 5 to 14 days. This is a blocking step — development can proceed in parallel using the test sandbox (limited set of numbers). We help prepare documents in advance to speed up the process. Using WhatsApp instead of SMS can save up to 70% on bulk messaging.
What's Included in the Work?
- Requirements analysis and integration design
- Creating and registering message templates in Meta
- Developing a server-side webhook handler from scratch or integrating with existing backend
- Building mobile UI for operator chat with service window support
- Configuring code signing, push notifications for iOS/Android
- Integration with App Store Connect and Google Play Console
- API usage documentation and access transfer
- Testing in sandbox and production launch
Estimated Timelines
WhatsApp Cloud API integration, template creation and registration, webhook handler, mobile dialog UI with service window support — 8–12 working days (excluding Meta business account verification time). Cost is calculated individually based on project complexity.
Request a consultation on WhatsApp Business API integration — contact us to evaluate your project.







