Cant get data from HTTP integration

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 ?

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.

2 Likes

thnx :smiley: It worked

I now do this:

file_put_contents(‘data.txt’, file_get_contents(‘php://input’));

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

1 Like

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