# Openvidu webhook example

**URL:** <https://openvidu.discourse.group/t/openvidu-webhook-example/2946>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [April 15, 2021, 6:43am UTC](https://openvidu.discourse.group/t/openvidu-webhook-example/2946 "2021-04-15T06:43:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elham\_ansari](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/elham_ansari/32/1451_2.png) [@elham\_ansari](https://openvidu.discourse.group/u/elham_ansari)\
**Post date:** [April 15, 2021, 6:43am UTC](https://openvidu.discourse.group/t/openvidu-webhook-example/2946/1 "2021-04-15T06:43:23Z")

</div>

Hi to everyone, I am looking to an example of how to use webhook of openvidu server do have any to suggest me?  
and after I setup webhook how can read events in my java application from the url ([http://example](http://example) :5000/session-events)  
Please help me

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [April 15, 2021, 7:20am UTC](https://openvidu.discourse.group/t/openvidu-webhook-example/2946/2 "2021-04-15T07:20:11Z")

</div>

You have to create an REST endpoint on your backend and point the webhook to it.

---

<div class="post-metadata">

**Author:** ![elham\_ansari](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/elham_ansari/32/1451_2.png) [@elham\_ansari](https://openvidu.discourse.group/u/elham_ansari)\
**Post date:** [April 15, 2021, 7:49am UTC](https://openvidu.discourse.group/t/openvidu-webhook-example/2946/3 "2021-04-15T07:49:43Z")

</div>

Before that May I test it by postman or curl if yes how?  
Do you have an example for CURL command please?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [April 15, 2021, 8:01am UTC](https://openvidu.discourse.group/t/openvidu-webhook-example/2946/4 "2021-04-15T08:01:13Z")

</div>

Hi,

You first need to understand the concept of Webhook. You cannot test it with curl or Postman, becasuse those are not REST API endpoints. Those are REST API clients, to perform REST operations. Just as the webhook.  
You need a REST API endpoint to receive REST API operations from a client. That client could be curl, Postman or OpenVidu Webhook.

> <https://softwareengineering.stackexchange.com/questions/356836/difference-between-rest-server-and-rest-client>
