Using curl on debian to set value to a virtual pin

Hello,
I am trying to set a value to a virtual pin with curl on RPI. I have set V51 on my datastream list as double.
using curl command i am able to read the value from the pin. But when i use:
curl -v -X PUT “https://blynk.cloud/external/api/update?token=my_token&V51=55
it responds:

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    < HTTP/1.1 404 Not Found
    < connection: keep-alive
    < content-length: 0
    < access-control-allow-origin: *
  • Connection #0 to host blynk.cloud left intact

Strange thing is that when i use
https://blynk.cloud/external/api/update?token=My_token&v51=55
on a chrome win11 browser
the update is successful

Found it!
If i use curl -v “https://blynk.cloud/external/api/update?token=my_token&V51=55” without the “-X PUT” parameter it works!

If you read the Blynk documentation you’ll see that all of the Blynk HTTP(S) calls use the GET method rather than PUT, even to update datastreams.

Pete.

1 Like