# Didn't receive any Webhook on my endpoint v2.29.0

**URL:** <https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [November 21, 2023, 10:56am UTC](https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861 "2023-11-21T10:56:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.dimaria](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@m.dimaria](https://openvidu.discourse.group/u/m.dimaria)\
**Post date:** [November 21, 2023, 10:56am UTC](https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861/1 "2023-11-21T10:56:44Z")

</div>

Hi team, following the guide how to set up a webhook here:[OpenVidu Webhook - OpenVidu Docs](https://docs.openvidu.io/en/2.29.0/reference-docs/openvidu-server-webhook/#nodecrashed)

In order to play with them and get a first approach, I’ve created an endpoint POST within the Application Server (I’m usign the openvidu-basic-node)

app.post(“/webhook”, async (req, res) =\> {  
var response = req.body;  
console.log(“webhook called”, response);  
res.status(200).send(“ok”);  
});

and I’m pointing to it on Openvidu server config

“OPENVIDU\_WEBHOOK”: true,  
“OPENVIDU\_WEBHOOK\_ENDPOINT”: “[http://localhost:5000/webhook](http://localhost:5000/webhook)”,  
“OPENVIDU\_WEBHOOK\_HEADERS”: ,  
“OPENVIDU\_WEBHOOK\_EVENTS”: [  
“sessionCreated”,  
“sessionDestroyed”,  
“participantJoined”,  
…]

Unfortunately I couldn’t received any webhook when ex. I create a session an join to it etc…  
What I miss or made wrong?

thanks a lot

---

<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:** [November 21, 2023, 11:41am UTC](https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861/2 "2023-11-21T11:41:10Z")

</div>

Try reviewing openvidu-server logs. There you will find webhook related messages that should explain why events are not reaching your endpoint.

---

<div class="post-metadata">

**Author:** ![m.dimaria](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@m.dimaria](https://openvidu.discourse.group/u/m.dimaria)\
**Post date:** [November 21, 2023, 1:38pm UTC](https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861/3 "2023-11-21T13:38:16Z")

</div>

I’ve reviewed openvidu-server logs and the error is **failed: Connection refused (Connection refused)**

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/2X/7/739761fdc4cec2e9cde8553853b37b0ace8faafd.png)

via Postman I can reach it out with status 200. What can I do?

---

<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:** [November 22, 2023, 11:18am UTC](https://openvidu.discourse.group/t/didnt-receive-any-webhook-on-my-endpoint-v2-29-0/4861/4 "2023-11-22T11:18:12Z")

</div>

This simply means that your openvidu-server is not able to reach URI **`http:/127.0.0.1:5000/webhook`**.

If you have deployed OpenVidu as the official instructions state, this is normal. You are trying to reach a “localhost” direction from inside a Docker container (`openvidu/openvidu-server`). When you use POSTMAN I am guessing you are running it from the localhost itself where your webhook receiver is up and running. That’s why POSTMAN is able to reach 127.0.0.1 but openvidu-server is not.

If you want to host your webhook server in the same machine as openvidu-server, you need the IP gateway of Docker. With that you can access “localhost” from within the Docker container `openvidu/openvidu-server`. Just run this command:

```bash
docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}'

```

And replace `"OPENVIDU_WEBHOOK_ENDPOINT": "http://localhost:5000/webhook"` with `"OPENVIDU_WEBHOOK_ENDPOINT": "http://<WHATEVER_IP_THE_COMMAND_RETURNS>:5000/webhook"`
