# Cant get data from HTTP integration

**URL:** <https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437>\
**Category:** Application Development\
**Created:** [March 28, 2019, 2:48pm UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437 "2019-03-28T14:48:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pzijlstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pzijlstra/32/35697_2.png) [@Pzijlstra](https://www.thethingsnetwork.org/forum/u/Pzijlstra)\
**Post date:** [March 28, 2019, 2:48pm UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437/1 "2019-03-28T14:48:05Z")

</div>

Hi all,

I’m playing around with HTTP integration. I can send data to my device like a charm. I used requestbin as an endpoint and its getting all the data nicely. Only if i change the endpoint to my own website I cant seem to get any data. What am I doing wrong?

Here is the code that should get the data:

```
$content=trim(file_get_contents("php://input"));
print_r($content);

```

Am I missing something ?

---

<div class="post-metadata">

**Author:** ![UdLoRa](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/udlora/32/45330_2.png) [@UdLoRa](https://www.thethingsnetwork.org/forum/u/UdLoRa)\
**Post date:** [March 28, 2019, 6:46pm UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437/2 "2019-03-28T18:46:22Z")

</div>

You cannot see the data this way. The url is called by the TTN platform, so it is receiving your output. Save the post body in a local file and then look at it.

---

<div class="post-metadata">

**Author:** ![Pzijlstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pzijlstra/32/35697_2.png) [@Pzijlstra](https://www.thethingsnetwork.org/forum/u/Pzijlstra)\
**Post date:** [March 29, 2019, 9:57am UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437/3 "2019-03-29T09:57:16Z")

</div>

thnx 😃 It worked

I now do this:

> file\_put\_contents(‘data.txt’, file\_get\_contents(‘php://input’));

---

<div class="post-metadata">

**Author:** ![UdLoRa](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/udlora/32/45330_2.png) [@UdLoRa](https://www.thethingsnetwork.org/forum/u/UdLoRa)\
**Post date:** [March 29, 2019, 10:08am UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437/4 "2019-03-29T10:08:38Z")

</div>

Yes (adequate for testing, remember to implement some authorization method).

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [May 28, 2019, 10:08am UTC](https://www.thethingsnetwork.org/forum/t/cant-get-data-from-http-integration/24437/5 "2019-05-28T10:08:39Z")

</div>

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