HTTP Downlink problems : no match founds with curl

Dear All,

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

Thanks a lot for your help!

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.

If you’re on Windows, then see Using curl or Postman for the HTTP Integration on Windows.

Also, please show the code of your Encoder in TTN Console. (Or, if you don’t have one, then don’t use payload_fields.)

Thanks Arjan;

Same message with curl -i.

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.

It’s working now. Juste added double quotes for URL!!!

Thanks a lot Arjan

1 Like

Ah, does the secret hold some funny character(s)? And what OS are you using?

Sorry for the delay…

I’m using MAC OS and no the secret hold no funny character…

Thanks very much for your help Arjan

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.