Skip to content

Commit dd4da9d

Browse files
committed
README/ ## Verify webhook events grammer fix
1 parent 769409e commit dd4da9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ When you exceed the rate limits for an endpoint, you will receive a `429` status
11271127

11281128
## Verify webhook events
11291129

1130-
ImageKit sends `x-ik-signature` in the webhook request header, which is used to verify the authenticity of the webhook.
1130+
ImageKit sends `x-ik-signature` in the webhook request header, which can be used to verify the authenticity of the webhook request.
11311131

11321132
Verifing webhook signature is easy with imagekit SDK. All you need is `x-ik-signature`, rawRequestBody and secretKey. You can copy webhook secret from imagekit dashboard.
11331133

@@ -1136,15 +1136,15 @@ const {
11361136
timestamp, // Unix timestamp in milliseconds
11371137
event, // Parsed webhook event object
11381138
} = imagekit.verifyWebhookEvent(
1139-
`{"type":"video.transformation.accepted","id":"58e6d24d-6098-4319-be8d-40c3cb0a402d"...`, // Raw request body encoded as Uint8Array or UTF8 string
1140-
't=1655788406333,v1=d30758f47fcb31e1fa0109d3b3e2a6c623e699aaf1461cba6bd462ef58ea4b31' // Webhook secret key
1139+
'{"type":"video.transformation.accepted","id":"58e6d24d-6098-4319-be8d-40c3cb0a402d"...', // Raw request body encoded as Uint8Array or UTF8 string
1140+
't=1655788406333,v1=d30758f47fcb31e1fa0109d3b3e2a6c623e699aaf1461cba6bd462ef58ea4b31', // Webhook secret key
11411141
'whsec_...' // Webhook secret key
11421142
) // Throws an error if signature is invalid
11431143

11441144
// { timestamp: 1655788406333, event: {"type":"video.transformation.accepted","id":"58e6d24d-6098-4319-be8d-40c3cb0a402d"...} }
11451145
```
11461146

1147-
Here is an example of implementing with express.js server.
1147+
Here is an example for implementing with express.js server.
11481148

11491149
```js
11501150
const express = require('express');

0 commit comments

Comments
 (0)