Using curl or Postman for the HTTP Integration on Windows

A few people have had trouble with the curl command with HTTP integration, just posting this as it works for me when I use the Windows version of Curl

Everything is OK with the curl command, but you need to slightly change the “data” part in a manner similar to the following

Try replacing
'{"dev_id":"yourdev","payload_raw":"AQE="}'
with

"{\"dev_id\":\"yourdev\",\"payload_raw\":\"AQE=\"}"

i.e. use " instead of to encapsulate the whole JSON and escape the " inside the json with a preceeding \

Your curl should look something like this

curl -v -X POST --data "{\"dev_id\":\"yourdev\",\"payload_raw\":\"AQE=\"}" https://integrations.thethingsnetwork.org/ttn-eu/api/v2/down/thing_nodes/http_1?key=ttn-account-v2.xxxxxxxxxxxxxxxxxxxxxxxxxxx

Hope it helps someone
https://www.thethingsnetwork.org/forum/t/downlink-from-http-integration-does-not-show-in-ttn-console-and-does-not-reach-my-device/10330

https://www.thethingsnetwork.org/forum/t/downlink-created-using-the-http-integration-is-not-shown-in-the-devices-data-page-of-ttn-console/12442/11

2 Likes

Or, use Postman.

Try the following to set it up (sorry for rubbish pics)

  1. HTTP Integration

    In your application in TTN Console, go to the “Integrations” tab and add “HTTP Integration” (or click on the one you added earlier as seen below)

    p1

  2. Go to https://requestb.in and set up an endpoint

    p2

  3. After setting up requestb.in, you will get a webpage endpoint like below

    p3

  4. Go back to the TTN console and enter the webpage endpoint as below (without the ?inspect)

    p4

  5. Send some data and go back to Requestb.in. You will see some data now.

    You can now get the “downlink_url” from the page:

    p5

  6. Use that URL to schedule a downlink. N.B. Remember to set “No Auth” for authorisation in postman - OK for testing etc

    p6and7

3 Likes

Thanks this solves my problem

Hi. I’m trying to integrate this in Android studio using Volley, but I don’t have any idea how to use “dev_id”:“yourdev” as a parameter. Those ‘’ are my problem. I’m kind of new to this so any solution would be usefull