The following shell script is used to access an IoT device that returns a JSON string, the content of which is not important for this question.
#!/bin/sh
secret= <not_telling>
id="e00fce688e6bcd0bad0763e7"
curl -k "https://api.particle.io/v1/devices/$id/peek" -d access_token=$<not_telling> -d args=5
I would like to reproduce this functionality in Mathematica
(* id and secret have been defined *)
req = HTTPRequest[
"https://api.particle.io/v1/devices/" <> id <> "/peek",
<|"Method" -> "POST",
"Query" -> {"args" -> "5", "access_token" -> secret}|>]
URLExecute@req
This code does successfully POST; however it behaves as if the "-d args=5" portion of the query is missing or ignored. I'm likely missing something trivial, but cannot place my finger on it.