I try to send data to my end node using HTTP. But when I send the following Curl command, I’ve a “no match found” returned!!
The uplink is ok and test with https://hookbin.com/
curl -X POST --data '{"dev_id":"myNode","port":1,"confirmed":false,"payload_fields":{"led":true}}' https://integrations.thethingsnetwork.org/ttn-eu/api/v2/down/myApp/test?key=ttn-account-v2.my_secret
Please show the full/exact error message, and please use curl -i or even curl -v for more verbose logging.
Is the URL you’re using the same as given in the downlink_url attribute in the JSON payload that is posted to Hookbin? Showing us "dev_id":"myNode" in the JSON message along with /myApp/test in the URL is quite confusing, if that’s how you redacted some details.
Here my command: curl -i -X POST --data '{"dev_id":"myNode","port":1,"confirmed":false,"payload_fields":{"led":true}}' https://integrations.thethingsnetwork.org/ttn-eu/api/v2/down/myApp/test?key=ttn-account-v2.my_secret
And here the response: no matches found: https://integrations.thethingsnetwork.org/ttn-eu/api/v2/down/myApp/test?key=ttn-account-v2.my_secret
Yes, the URL is an copy past of the given in the downlink_url
I’m not on Windows
The Encoder used:
function Encoder(object, port) {
// Encode downlink messages sent as
// object to an array or buffer of bytes.
var bytes = [];
if (port === 1) bytes[0] = object.led ? 1 : 0;
return bytes;
}
If curl -i does not give you any headers as sent by the server, then this is some weird problem (with a weird message) from your local system, not from TTN’s server. Maybe some hidden newline in the command line?
Note that only the key is secret; redacting the other parts of the actual command you’re using is just adding confusion.
I probably should have asked: which shell. In Bash on macOS, I don’t need quotes around the URL. Good to know that on some systems it’s needed, as, I guess, apparently the shell tries to find a matching file otherwise.