Whatsapp API setup
Configuring Webhook
Learn how to configure the webhook for your Whatsapp Business Account
To receive messages from your customers, you need to configure a webhook for your Whatsapp Business Account. The webhook is a URL that you provide to Whatsapp to send messages to your application.
Configuring Webhook for local development setup
Getting a public URL for your local development setup
You may sometimes face an error on the whatsapp webhook management dashboard saying that the URL is malicious in case when you are using NGROK, in that case you must go ahead with using cloudflare tunnel.
NGROK
If you are developing your application locally, you can use ngrok to expose your local server to the internet.
To use ngrok, follow these steps:
- Download and install ngrok from here.
- Run the following command in your terminal to expose your local server to the internet:
- You will see something like this in your terminal:
Make sure to replace
<your-application-port>
with the port number on which your application is running.Cloudflare Tunnel
To use cloudflare tunnel, follow these steps:
- Download and install cloudflare tunnel from here.
- Run the following command in your terminal to expose your local server to the internet:
- You will see something like this in your terminal:
Make sure to replace
<your-application-port>
with the port number on which your application is running.Submitting URL to whatsapp business platform
Follow the steps below to submit your webhook URL to the Whatsapp Business Platform and enable incoming events routing to your local development setup:
1
2
3
4
Make sure your Wapi.js local application is up and running before proceeding with verify and save process.
Was this page helpful?