# Verify HMAC

> Verify a message against an HMAC signature.

- ID: `verify_hmac`
- Type: Block
- Category: [Strings](https://inventor.bot/docs/reference/blocks/strings.md)

> Commonly used to verify webhooks. Ensure the algorithm matches the sender.

- Value block: it can be used directly inside expressions, e.g. `"Result: " + verify_hmac(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `message` | yes | Message content. |  |
| `signature` | yes | Provided HMAC signature. |  |
| `secret` | yes | Shared secret. |  |
| `algorithm` | yes | Hash algorithm used. | `"SHA256"`, `"SHA512"`, `"SHA1"`, `"MD5"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `match` | Whether the signature matches. | e.g. `"false"` |

**Example**

```go
verifyHmac := verify_hmac(Args{
	message:   "...",
	signature: "...",
	secret:    "...",
	algorithm: "SHA256",
})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Match: " + verifyHmac})
```