# C# example of validating webhook signature

**URL:** <https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015>\
**Category:** Development\
**Created:** [9월 12, 2018, 6:38오전 UTC](https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015 "2018-09-12T06:38:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![PromoFaux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/promofaux/32/119589_2.png) [@PromoFaux](https://meta.discourse.org/u/PromoFaux)\
**Post date:** [9월 12, 2018, 6:28오후 UTC](https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015/4 "2018-09-12T18:28:13Z")

</div>

> Bizarrely can’t make my local manual tests work

You may find it useful to stick a `Console.WriteLine()` as an `else` to `if (signature == calcSig)` . Something like

```Csharp
Console.WriteLine($"Calculated Signature: {calcSig}\nSignature from webhook: {signature}");

```

Keep in mind that when you are sending test hooks using Postman, you need to change the signature header value if you make any changes to the actual payload. When testing I would run it through my app, let it fail, and then just copy/paste the calculated signature into the header 😉

---

_[View the full topic](https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015)._
