> For the complete documentation index, see [llms.txt](https://docs.vesicash.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vesicash.com/~/revisions/B4WbZDJmrvuixkS1SN5C/generate-webhook-secret.md).

# Generate webhook secret

This endpoint is used to generate a webhook secret that is essential for authenticating the sources of webhooks.

<mark style="color:green;">POST</mark> : v1/account/generate-webhook-secret

#### Headers

| Name       | Type   | Decsription              |
| ---------- | ------ | ------------------------ |
| secret-key | string | Your Vesicash secret key |
| public-key | string | Your Vesicash public key |

#### Response

On a successful request, the API will return a response with the following structure:

* webhook\_secret (string): The generated webhook secret that will be used for authentication.

```
{
  "status": "",
  "code": 0,
  "message": "",
  "data": {
    "webhook_secret": ""
  }
}

            
```

**NOTE:** **Webhook Authentication Using HMAC-SHA256** After authentication using the specified method, the generated webhook token must be stored in a secure location (for example, a secrets manager or encrypted configuration store). The webhook signature is created by computing an HMAC-SHA256 hash on a single string that must be reconstructed exactly on your server.

```
HMAC-SHA256(   your_webhook_secret,   timestamp + "." + raw_request_body )  
```
