File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,24 @@ curl -X POST http://localhost:3010/webhooks \
145145 -d ' {"id": "msg123", "status": "delivered", "deliveredAt": "2024-11-30T12:00:00Z"}'
146146```
147147
148+ For example,
149+
150+ ``` bash
151+ secret=" mySecret"
152+ payload=' {"id": "msg123", "status": "delivered", "deliveredAt": "2024-11-30T12:00:00Z"}'
153+ signature=$( echo -n $payload | openssl dgst -sha256 -hmac $secret | awk ' {print $2}' )
154+
155+ curl -X POST http://localhost:3010/webhooks \
156+ -H " Authorization: Bearer $signature " \
157+ -H " Content-Type: application/json" \
158+ -d " $payload "
159+ ```
160+
161+ The response should be look like this,
162+
163+ ```
164+ {"message":"Webhook processed successfully."}
165+ ```
148166
149167### Unit Tests
150168
You can’t perform that action at this time.
0 commit comments