You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These authentication parameters can be used in client-side upload forms to securely upload files without exposing your private API key.
292
292
293
+
## Webhook verification
294
+
295
+
The ImageKit SDK provides utilities to verify webhook signatures for secure event handling. This ensures that webhook requests are actually coming from ImageKit and haven't been tampered with.
296
+
297
+
### Verifying webhook signatures
298
+
299
+
```ts
300
+
importImageKitfrom'@imagekit/nodejs';
301
+
302
+
const client =newImageKit({
303
+
privateKey: process.env['IMAGEKIT_PRIVATE_KEY'],
304
+
webhookSecret: process.env['IMAGEKIT_WEBHOOK_SECRET'], // Required for webhook verification
console.log('Invalid webhook signature or malformed payload');
322
+
// Reject the request
323
+
}
324
+
```
325
+
326
+
For detailed information about webhook setup, signature verification, and handling different webhook events, refer to the [ImageKit webhook documentation](https://imagekit.io/docs/webhooks#verify-webhook-signature).
0 commit comments