# Can't validate event notification endpoint URL

**URL:** <https://devforum.zoom.us/t/cant-validate-event-notification-endpoint-url/80380>\
**Category:** Meetings\
**Created:** [December 16, 2022, 5:20am UTC](https://devforum.zoom.us/t/cant-validate-event-notification-endpoint-url/80380 "2022-12-16T05:20:43Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![freelancer.nak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/freelancer.nak/32/40968_2.png) [@freelancer.nak](https://devforum.zoom.us/u/freelancer.nak)\
**Post date:** [December 22, 2022, 11:30am UTC](https://devforum.zoom.us/t/cant-validate-event-notification-endpoint-url/80380/9 "2022-12-22T11:30:14Z")

</div>

@sales4 @sfaraclas @littlelaureates Here is C# working code 👇

```auto
    [HttpPost(Name = "events")]
    public ActionResult Events(ValidateUrlEvent notification)
    {
        var encoding = new System.Text.ASCIIEncoding();

        var sha256 = new System.Security.Cryptography.HMACSHA256();
        sha256.Key = encoding.GetBytes("Your Event Secret Token");

        var hash = sha256.ComputeHash(encoding.GetBytes(notification.payload.plainToken));

        var hashed=ToHex(hash,false);

        return Ok(
            new
            {
                plainToken = notification.payload.plainToken,
                encryptedToken = hashed
            }
        );
    }

    private static string ToHex(byte[] bytes, bool upperCase)
    {
        StringBuilder result = new StringBuilder(bytes.Length * 2);
        for (int i = 0; i < bytes.Length; i++)
            result.Append(bytes[i].ToString(upperCase ? "X2" : "x2"));
        return result.ToString();
    }

```

 ![Screenshot 2022-12-22 at 4.29.49 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/d/5d422ad8a80207645c3f680a853cf3ef393180e7.jpeg)

---

_[View the full topic](https://devforum.zoom.us/t/cant-validate-event-notification-endpoint-url/80380)._
