Getting/Finding an access token

Hi, i used to be able find the access token for my Photon in the particle console, but not anymore. It seems i now have to generate one with via a complicated method i don’t understand… https://docs.particle.io/guide/how-to-build-a-product/authentication/ I have some questions i hope you can help me witt;

Is the documented method the only one to get an access token? And if so, is there an easy step-by-step instruction on how to generate the access token via the terminal or so?

You can also find and create the access token in Web IDE or CLI.

>particle token
Manage access tokens (require username/password)
Usage: particle token <command>
Help:  particle help token <command>

Commands:
  list    List all access tokens for your account
  revoke  Revoke an access token
  create  Create a new access token
1 Like

Thanks for the speedy reply. If i retrieve all the tokens via the CLI i get a lot of tokens, but nothing for my Photon as it seems. Just to be clear. I’m looking for the access_token i have to put in a function call like this.

<form action="https://api.particle.io/v1/devices/your-device-ID-goes-here/led?access_token=your-access-token-goes-here" method="POST">

You can use any of the access tokens that haven't expired yet for any of your devices.

But I'm not sure you can put the access_token into the POST request as an URL-encoded parameter.

You could use Particel API JS or have a look at this slightly dated tutorial

1 Like

Yes, what ScruffR said. Access tokens are for your account, not a specific device. So any access token for your account can be used with any device in your account.

The easiest place to get one is in https://build.particle.io, in the Settings (gear) icon:

1 Like

Thx Guys! Problem solved…

Particle has changed the format of the page to recommend the CLI (apparently I don’t have an access token yet). The CLI is not my preferred method, because I have no need for the CLI. Are there any others approaches?

You can create a token from your browser with no software install:

Create Token - Browser-Based

Hi rickkas7, Great suggestion. But I can not get it to work. On top of the page where I put in my email and password. It does not recognize the newly generated password and keeps rejecting my request to generate the Token
I would appreciate any help
Thanks Kazem

Hi Guys I also have another question.
I have installed Particle C LI. docs.particle.io is telling me to input this command ($ particle token create --never-expires). But it does not tell me where or what web page to input this command. I am confused. Would someone help me, please? Many thanks

Thanks, Guys I found the solution to the Particle CLI