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

# Verify signatures

> Check that an event came from SchoolCues before you act on it.

SchoolCues signs events the way the [Standard Webhooks](https://www.standardwebhooks.com) specification does, so any Standard Webhooks library can check them.

| Header | Value |
| - | - |
| `webhook-id` | The event's ID, the same on every retry |
| `webhook-timestamp` | When it was sent, in Unix seconds |
| `webhook-signature` | `v1,` then the base64 HMAC-SHA256 of `{id}.{timestamp}.{body}` |

The HMAC key is the bytes of your signing secret after its `whsec_` prefix, base64-decoded.

```javascript verify.js theme={null}
import { Webhook } from "standardwebhooks";

const webhook = new Webhook(process.env.SCHOOLCUES_WEBHOOK_SECRET);

// Throws if the signature or timestamp doesn't check out.
const event = webhook.verify(rawBody, {
  "webhook-id": request.headers["webhook-id"],
  "webhook-timestamp": request.headers["webhook-timestamp"],
  "webhook-signature": request.headers["webhook-signature"],
});
```

Verify against the raw request body, before any JSON parsing changes it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.