# Event Hooks - Sample ReST Application

**URL:** <https://devforum.okta.com/t/event-hooks-sample-rest-application/6285>\
**Category:** Questions\
**Created:** [September 16, 2019, 2:42pm UTC](https://devforum.okta.com/t/event-hooks-sample-rest-application/6285 "2019-09-16T14:42:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDD](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MDD](https://devforum.okta.com/u/MDD)\
**Post date:** [September 16, 2019, 2:42pm UTC](https://devforum.okta.com/t/event-hooks-sample-rest-application/6285/1 "2019-09-16T14:42:39Z")

</div>

Hi,

I am trying to setup an Event Handler but could notice that the ReST Application which we developed was not getting invoked while validation.I am looking for a Sample ReST Application code/doc which would give some insight on how exactly the ReST Application would like .  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [September 17, 2019, 6:26am UTC](https://devforum.okta.com/t/event-hooks-sample-rest-application/6285/2 "2019-09-17T06:26:57Z")

</div>

Hi @MDD

To verify the event hook, you need to read the value of `X-Okta-Verification-Challenge` header and then display it in the page as follows:

```auto
{
    "verification": "VALUE_FROM_X-Okta-Verification-Challenge"
}

```

Once the hook has been verified, you can return an empty response and it will be treated as successful in Okta.

You can find [here](https://github.com/dragosgaftoneanu/okta-hooks-php) a simple library to handle all Okta hooks, including event hooks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 23, 2024, 7:22pm UTC](https://devforum.okta.com/t/event-hooks-sample-rest-application/6285/3 "2024-01-23T19:22:29Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
