[SOLVED]Please login - it appears your access_token may have expired

I haven’t been using this long. I forgot how to fix this thing.
I’ve deleted sparkcore device from build.particle.io
I tried reset.

particle flash --factory tinker
particle flash --usb cc3000
particle flash --usb tinker

particle setup

Still show up Please login - it appears your access_token may have expired

No luck. I did particle doctor.

Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "SPI Flash : SST25x"
Downloading to address = 0x00002000, size = 610
Download [=========================] 100% 610 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Saved!
attempting to add a new public key for device 5******************************


  Please login - it appears your access_token may have expired

submitPublicKey got error: invalid_token
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - invalid_token

How do you fix this?

Never mind. I fixed it in seconds. Here’s how you do it on mac…

Terminal

npm uninstall -g spark-cli
npm uninstall -g particle-cli

Go to Nodejs
https://nodejs.org/en/
Download 5.10.1 Stable
Run the program.

sudo npm install -g particle-cli

particle flash --factory tinker
particle flash --usb cc3000
particle keys doctor ########### (your old key)
particle flash --usb tinker
particle setup

Lol, you do not need to do that all.

Simply login at https://build.particle.io
Go to settings settings -> reset token

Then on your local machine invoke the following:

particle logout
particle login

to refresh the token on the machine and you are done.

2 Likes

Thank you so much Sven, perfect!