API call to flash tinker?

Is there a method to flash tinker through an api call? were trying to achieve a method to potentially save us wireless publishes if the device gets stuck boot looping.

That’s not something we’d recommend automating, but yes, the API can flash binaries.
There is no direct way to flash Tinker, but you can compile a binary and use https://docs.particle.io/reference/cloud-apis/api/#flash-a-device-with-a-pre-compiled-binary to then flash it.

1 Like

What would be a recommended solution to this then? primarily were worried about outside device messages causing issues with unexpected responses (wrong data type/failed conversions) causing panics over and over, we have a fail safe for waiting and trying again in 10 minutes right now, however another level of failsafe would be nice to prevent constant retries for hours on end. Also, other things that didn’t allow our prevention methods time to interfere have happened, though were not quite sure what they were

You should use enterSafeMode from the device. See

1 Like