Skip to content
COL0

How to deploy a WhatsApp Business bot (official API) step by step

With the official WhatsApp API, Meta sends every message to a URL of yours. That is why deployment is not optional: without a public server with HTTPS, your bot simply receives nothing.

Written by Victor Barrera

What you need before starting

  • A Meta developer account and an app with the WhatsApp product.
  • A phone number for the bot and, for real use, your business verified.
  • A server with a domain and valid HTTPS.

If you also plan to use a virtual number in the WhatsApp app, start with what to check first.

The steps, in short

  1. Create the app in Meta and get the number’s ID and an access token.
  2. Expose an endpoint on your server for the webhook, with a domain and an HTTPS certificate.
  3. Verify the webhook: Meta makes an initial request with a verify token that your endpoint must echo back.
  4. Validate the signature of every incoming message (the X-Hub-Signature-256 header) to make sure it comes from Meta.
  5. Respond fast: acknowledge with a 200 right away and process the message in the background, with a queue if volume grows.
  6. Generate a permanent token with a system user; the temporary token expires in hours.
  7. Create message templates to start conversations outside the 24-hour window.
  8. Monitor: log send errors and alert if the webhook stops receiving events.

Common mistakes

  • Using the temporary test token in production and the bot stops working the next day.
  • Processing everything inside the same request, so Meta retries or disables the webhook because of slowness.
  • Treating duplicate messages as new ones: store the message ID.
  • Keeping the token in the code or the repository.

How we help

We deploy your backend with HTTPS, signature verification, a processing queue and monitoring. If you need to connect the bot to your ERP or CRM, we do that too.

Frequently asked questions

Do I need my own server for a WhatsApp bot?

You need a public HTTPS URL that receives the webhook. It can be a VPS, a container or a serverless service, as long as it responds quickly and is always available.

Can I message a customer first?

Only with message templates approved by Meta if more than 24 hours have passed since the customer's last message. Within that window you can reply with free text.

Ready to publish your project?

Book your free 30-minute session and leave with a clear plan.

Book your free session