LED on/off example

I am trying to get the LED example to work

I have the code loaded to the device and it works from the console.

Now the issue is controlling it from a webpage

https://docs.particle.io/tutorials/hardware-projects/hardware-examples/boron/

I created a webpage with the code in the example with the “Device ID” and “Secret”

click the Turn on the LED

API…error blah blah blah “the access token was not found”

Obviously I am missing something fundamental here

Could you clarify… Did you use your Device ID and Secret? How did you obtain your secret? Although I could assume from your description that you grabbed the secret from your console, the message that the token does not exist seems to indicate that the token is incorrect. Did you copy and paste the token? If so, check for extraneous characters, blank space, the length to make sure it matches, etc. For that matter, check the Device ID for the same issues. Are you able to run the CURL command from the example in a command prompt?

Yeah used the device ID for my device from. The console for the device I am using a boron lte . The secret … I clicked on the finger print and selected simple authorization (web) added the URL for the webpage with the on / off do it!

I’ll have to figure out what the CURL command is and get back to you

If you go to the settings tab in the Web IDE, you’ll find an access token. That’s (the) one you want to use.

Many unending thanks to you.

Still didn’t work until I noticed I deleted the “access_token=” too

Now on to figuring out how to do a momentary push button or a pulse of on/off

Matt

1 Like