Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

WhatsApp Business Messaging: App Prep Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide walks you through preparing your app for WhatsApp Business Messaging, so your users can start conversations with your business directly from your app. You'll learn the prerequisites, step-by-step setup, common pitfalls, and troubleshooting tips to get your integration live smoothly.

What You'll Need

  • A WhatsApp Business Account (WABA) – created via the Meta Business Suite or by a Meta Business Solution Partner.
  • A verified Meta Business Manager account (business verification may be required for higher messaging limits).
  • A phone number that can receive SMS or voice calls for verification (this number cannot be used for a personal WhatsApp account).
  • Access to the WhatsApp Business Platform (API) – either via the Cloud API (hosted by Meta) or On-Premises API.
  • A server or backend to handle webhooks and send messages (for Cloud API, you need a public HTTPS endpoint).
  • Basic knowledge of REST APIs and webhooks.

Step-by-Step

  1. Create a Meta Business Manager account – Go to business.facebook.com, sign up, and set up your business profile. This is the central hub for managing your WhatsApp Business Account.
  2. Add WhatsApp to your Business Manager – In Business Manager, go to "WhatsApp Accounts" under "Accounts". Click "Add" and follow the prompts to create a new WhatsApp Business Account. You'll need to name it and link it to your business.
  3. Verify your business – For full access and higher messaging limits, complete business verification. Go to "Security Center" in Business Manager, click "Start verification", and provide your business legal name, address, and tax ID (or equivalent). This can take a few days.
  4. Get a phone number – You'll need a phone number that isn't already registered with WhatsApp. It can be a landline, mobile, or a virtual number (like Twilio). Make sure it can receive the verification code via SMS or voice call.
  5. Register the phone number with WhatsApp – In your WhatsApp Business Account settings, click "Phone Numbers", then "Add Phone Number". Enter your number and choose how to receive the verification code. Complete the verification.
  6. Set up the WhatsApp Business Platform – For the Cloud API (recommended for most apps), go to the Meta for Developers portal, create a new app, and add the WhatsApp product. You'll get a temporary access token and a test phone number. For production, you'll need to generate a permanent token and configure your phone number.
  7. Configure webhooks – In the app dashboard, set up a webhook URL on your server that receives POST requests from Meta. This URL must be HTTPS and publicly accessible. You'll verify the webhook by responding to a challenge string.
  8. Handle webhook events – Your server should listen for events like messages (incoming messages) and message_status (delivery receipts). Parse the payload and respond accordingly.
  9. Send your first message – Use the API endpoint POST /{phone-number-id}/messages with a JSON body containing the recipient's phone number and message text. Use your access token for authentication.
  10. Test with the WhatsApp app – Install WhatsApp on your phone, add the test number (or your production number) as a contact, and send a message to it. Verify that your webhook receives it and that your API sends a reply.
  11. Integrate with your app – Add a "Chat with us on WhatsApp" button or a deep link (https://wa.me/15551234567) that opens WhatsApp with a pre-filled message. For a more seamless experience, use the WhatsApp Business Messaging SDK (for Android/iOS) to launch a chat directly from your app.
  12. Go live – Once testing passes, submit your app for review (if needed) and switch to production. Monitor your messaging limits and webhook health.

Common Mistakes

  • Using a personal number – The phone number you register must not be associated with a personal WhatsApp account. If it is, you'll get an error.
  • Not verifying webhooks – If you don't respond correctly to the webhook verification challenge, Meta won't send events to your server.
  • Ignoring message templates – For business-initiated messages (outside the 24-hour customer service window), you must use pre-approved templates. Sending free-form messages outside the window will fail.
  • Hardcoding tokens – Access tokens expire. Use a secure storage solution and refresh tokens automatically.
  • Not handling rate limits – WhatsApp has tiered messaging limits. If you exceed them, messages may be rejected. Monitor your limits and scale gradually.
  • Forgetting to set up a fallback – If WhatsApp is down or webhooks fail, have a plan to handle customer inquiries via email or SMS.

Tips

  • Use the Cloud API – It's simpler to set up than the On-Premises API, with no server hosting for the API itself (just your webhook).
  • Implement a message queue – To handle spikes in incoming messages, use a queue (like RabbitMQ or SQS) to process webhooks asynchronously.
  • Set up message templates early – Template approval can take time. Create common templates (welcome, order updates, support) in advance.
  • Monitor webhook health – Use a service like UptimeRobot to alert you if your webhook endpoint goes down.
  • Test with multiple phone numbers – Use the test number provided by Meta and a few real numbers to ensure everything works across devices.

Troubleshooting

  • Webhook not receiving events – Check that your server is publicly accessible (use a tool like ngrok for local testing). Verify the webhook URL is correctly set in the Meta dashboard and that your server responds with 200 OK to the challenge.
  • Message send fails with error 131030 – This means the recipient's phone number isn't on WhatsApp or isn't valid. Double-check the number format (must include country code, no leading +).
  • Access token invalid – Tokens expire after 24 hours for temporary ones. Generate a permanent token by exchanging your temporary token for a long-lived one (valid ~60 days) or use a system user token.
  • Template message rejected – Review the template's language, sample content, and category. Ensure it complies with WhatsApp's policy (e.g., no promotional content in utility templates).
  • Phone number verification fails – If you don't receive the code, try the voice call option. Also, ensure the number is not already registered with WhatsApp.
  • Rate limit exceeded – Wait for the limit to reset (usually after 24 hours) or request a limit increase by submitting a request in the Meta dashboard.

Frequently Asked Questions

Do I need a separate phone number for WhatsApp Business API?

Yes, the number must be dedicated to business messaging and cannot be linked to a personal WhatsApp account. You can use a virtual number or a SIM card.

What is the difference between WhatsApp Business App and WhatsApp Business API?

The Business App is for small businesses with a single user, while the API is for medium/large businesses that need to send automated messages at scale and integrate with their systems.

Can I send messages to users who haven't opted in?

No, you must have explicit opt-in from users before sending them messages. This is a strict WhatsApp policy.

How long does it take to get a template approved?

Typically 1-2 business days, but it can take longer. Submit templates early and ensure they follow the guidelines.

What are messaging limits?

Limits start at 1,000 business-initiated conversations per day and increase based on your business verification and quality rating. You can request a limit increase.

Can I use the same phone number for WhatsApp and regular SMS?

Yes, but the number must be able to receive SMS or calls for verification. After setup, you can use it for both, but be aware that WhatsApp may flag the number if it's used for high-volume SMS marketing.