> ## Documentation Index
> Fetch the complete documentation index at: https://golang.wapikit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

<Note>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.</Note>

* [Using NGROK](#ngrok)
* [Using Cloudflare Tunnel](#cloudflare-tunnel)

#### NGROK

If you are developing your application locally, you can use [ngrok](https://ngrok.com/) to expose your local server to the internet.

To use ngrok, follow these steps:

1. Download and install ngrok from [here](https://ngrok.com/download).
2. Run the following command in your terminal to expose your local server to the internet:

```bash theme={null}
ngrok http http://localhost:<your-application-port>
```

3. You will see something like this in your terminal:

<Frame>
  <img src="https://mintcdn.com/softlancer/vO8YSHLeO3ArL664/assets/configure-webhook/1.png?fit=max&auto=format&n=vO8YSHLeO3ArL664&q=85&s=a16b2cfd9321b138285128eb4b061789" width="2640" height="1804" data-path="assets/configure-webhook/1.png" />
</Frame>

<Note>Make sure to replace `<your-application-port>` with the port number on which your application is running.</Note>

#### Cloudflare Tunnel

To use cloudflare tunnel, follow these steps:

1. Download and install cloudflare tunnel from [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation).
2. Run the following command in your terminal to expose your local server to the internet:

```bash theme={null}
cloudflared tunnel --url http://localhost:<your-application-port>
```

3. You will see something like this in your terminal:

<Frame>
  <img src="https://mintcdn.com/softlancer/vO8YSHLeO3ArL664/assets/configure-webhook/cloudlfare.png?fit=max&auto=format&n=vO8YSHLeO3ArL664&q=85&s=0ad27caf39dd740b3829265371f4b9c2" width="1340" height="136" data-path="assets/configure-webhook/cloudlfare.png" />
</Frame>

<Note>Make sure to replace `<your-application-port>` with the port number on which your application is running.</Note>

### 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:

<Steps>
  <Step>
    <Accordion title="Visit Your App Dashboard">
      <Note>Visit your application dashboard via [Meta Developer Portal](https://developers.facebook.com/apps)</Note>
    </Accordion>
  </Step>

  <Step>
    <Accordion title="Subscribe to the webhook object for your app">
      <Frame>
        <img src="https://mintcdn.com/softlancer/vO8YSHLeO3ArL664/assets/configure-webhook/2.png?fit=max&auto=format&n=vO8YSHLeO3ArL664&q=85&s=1482679b7bd61748d631ed37008e8ea0" width="6048" height="3288" data-path="assets/configure-webhook/2.png" />
      </Frame>
    </Accordion>
  </Step>

  <Step>
    <Accordion title="Add the public URL and webhook secret.">
      <Note>Webhook secret is the same string which you have used in your Wapi.go Application Client.</Note>

      <Frame>
        <img src="https://mintcdn.com/softlancer/vO8YSHLeO3ArL664/assets/configure-webhook/3.png?fit=max&auto=format&n=vO8YSHLeO3ArL664&q=85&s=cc4995174ef4fee37862ee5905f640f7" width="3208" height="1212" data-path="assets/configure-webhook/3.png" />
      </Frame>
    </Accordion>
  </Step>

  <Step>
    <Note>Make sure your [Wapi.go local application](/guide/building-your-application/creating-wapi-client) is up and running before proceeding with verify and save process.</Note>

    <Accordion title="Click Verify and Save">
      <Frame>
        <img src="https://mintcdn.com/softlancer/vO8YSHLeO3ArL664/assets/configure-webhook/4.png?fit=max&auto=format&n=vO8YSHLeO3ArL664&q=85&s=050d54fcaa70e2f81aacad602eaea7d5" width="3208" height="1212" data-path="assets/configure-webhook/4.png" />
      </Frame>
    </Accordion>
  </Step>
</Steps>
