# Webhooks - Custom Webhook

**URL:** <https://www.thethingsnetwork.org/forum/t/webhooks-custom-webhook/46941>\
**Category:** The Things Stack v3\
**Created:** [April 21, 2021, 11:40am UTC](https://www.thethingsnetwork.org/forum/t/webhooks-custom-webhook/46941 "2021-04-21T11:40:25Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 5, 2021, 9:12am UTC](https://www.thethingsnetwork.org/forum/t/webhooks-custom-webhook/46941/9 "2021-05-05T09:12:24Z")

</div>

I don’t know what the effect of setting the header is at that stage, as it’s an outgoing response element.

The input is raw text, this works for me:

```
<?php
$data = file_get_contents("php://input");

// Save a raw copy of the message in a debug directory
// this will fill up quickly so don't leave it turned on
//$pathNFile = "debug/".date('YmdHis')."-".uniqid().".txt"; 
//file_put_contents($pathNFile, $data);

$json = json_decode($data, true);

...
```

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/webhooks-custom-webhook/46941)._
