Using curl to reconnect a "stuck" Electron


Hello Community,

I’m trying to run a curl command to force a cloud disconnect from an electron.

I have a device that is not able to accept a firmware flash but currently uploading just fine to Ubidots just fine.

Today is 12-12-18 and while the device has been on continuously, the last handshake is 10-1-18.

I think the 2 month old handshake is the problem,

Particle support suggested using a curl request to force the disconnect.

But that didn’t work and I was curious if others have used this command? Did it work for you?

My first goal is to get the forced disconnect feature working. Then evaluate if it updates the handshake.

Thank you!


I was able to run

curl = <access_token> 

But! i am noticing that this is just devices in my general account. NOT for the devices in my product. The access token I am using I pulled from particle build.

How can I find out the access token for my particle console product?


For product devices:

curl -X PUT<product_id>/devices/<device_id>/disconnect?access_token=<product_bearer_token>


For the non-product version, the angle brackets are only for the example, make sure you don’t include them. Make sure all of the letters are lower-case in device ID.

And the access_token must be for the account that claimed the device.

Since in many cases electron product owners claim all of their devices to a single account, you can use either the product or non-product endpoint if you have the appropriate access token.


Thanks Rickkas7,

Thank you for the update,

I’m having trouble understanding where I can find the Product_Bearer_Token.

I was expecting it to be as easy as getting the token from Particle Build.

I tried creating a new “client” in my product, but that didn’t seem to work either.


Instructions for getting a product bearer token are here:


Hi @rickkas7 Thanks for the help with the bearer token.

I think I am now asking correctly for disconnecting the stuck device id.

The error I get is “Timed out.”

Are there additional steps I can try to reset the handshake? I am very very certain the device is powered on right now.


You’re missing the -X PUT. Without it, it’s trying to get a variable, which is timing out because the devices isn’t responding, which is why you’re trying to reset the cloud connection.

{"status":"disconnection initiated"}

Got good tone from the curl entry! (Typo curl -X PUT was fixed above) , but… I’m not seeing any change to the particle console handshake yet. :confused: Will update if it changes over the next few hours.


Just one note: Seeing data arriving at Ubidots does not constitute proof that the device is connected to the cloud. Ubidots does not use the Particle cloud to send data to their servers. That’s done via direct UDP transfer.


It can take up to a ping interval (23 minutes) or until a publish for the /disconnect to take effect.


Ah! Hi @ScruffR I was using the Ubidots data as a way to confirm that it was connected to cellular.


I read your thread about a stuck electron. I have exactly the same problem and also have the remote electron still reporting to Ubidots. Did you ever get the curl command to un-stick your electron? If not, did you find some other solution?


Hello @colemanjj

I don’t remember this being resolved.
I’m pretty sure I just replaced the Electron.
Sorry to hear you are in a similar situation! :confused:

Good Luck!