Can someone walk me through claiming a device using JavaScript?

The SoftAP javascript library is where I started, but I’m having trouble claiming a brand new device.

Any help is much appreciated!

Hi @mamahler

To claim a device via javascript you will need to use both the Particle Javascript SDK as well as the SoftAP. Essentially you will do a login using your Particle account (if you don’t have one, you can create one here). Then you can use the token that is returned as part of the login to create a claim code, then pass it to the Photon via the SoftAP.

I did a pretty basic version on a previous post here:

You will need to include the jquery to the above example as well as make a div for the claiming button, because you have to switch to the Photon’s wifi once you get the token.

Hope that helps!