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)
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)
Go to https://requestb.in and set up an endpoint
After setting up requestb.in, you will get a webpage endpoint like below
Go back to the TTN console and enter the webpage endpoint as below (without the ?inspect
)
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:
Use that URL to schedule a downlink. N.B. Remember to set “No Auth” for authorisation in postman - OK for testing etc
3 Likes
kukaoo
(Kukaoo)
February 11, 2018, 12:39pm
3
CurlyWurly:
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/
Thanks this solves my problem
Mondor
(Mondor)
March 19, 2019, 7:30pm
4
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