Error trying to install firmware binary through api

Hi there,

I am trying to update the firmware version of my device, but it is always giving me a 500 error. Without any extra message. Any help pleaseeee. This is my cUrl request:

curl -X PUT
-H ‘Authorization: Bearer mytoken’
-H ‘content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW’
-F file_type=binary
-F ‘file=@C:\Users\josea\Desktop\IOT ROMERO\LIGHT\V1.0.0\LIGHT_V1.0.0.bin’

and this is the response it gives me:

“ok”: false,
“code”: 500,
“errors”: [
“error”: {}


Why go through all of that when you can just do particle flash <device name> from CLI?

I’m pretty sure you shouldn’t include the content-type like that. Curl will generate that automatically and adding another will probably cause problems.

Passing the Windows path with backslashes in the file=@ parameter probably won’t work. Try it using forward slashes / instead.

1 Like