hi
yes i have seen the documentation but didn’t really understood what to do.
It would be very nice if you (or someone else) could tell me which command i need under Win 7 64. So i have tried to install the particle-cli (failed with an error on the npm command). I get access via putty but i didn’t get a response (i think i have to do the Photon in Listening Mode??? but than which exact command???)
Or do i have to install curl (and than which command?).
So for now i’m really lost in space but i think someone here can help me
thx
hape
Hi @hape
It doesn’t sound like your device is fully setup yet. You need to get it to breathing cyan in order to use any cloud API.
Once you have that, the easiest way to get started is with curl, which is a command line program that can make web requests similar to how a browser operates but gives you complete control. A lot of the documentation examples use curl to show how the API works.
You can download it here:
hi @bko
so my Photon is up and breathing (i have flashed a program to the Photon and it works so thats all fine).
I have now curl installed.
if i do this:
C:\Users\hape>L:\Photon\AMD64\curl https://api.particle.io/v1/devices\?access_token=
i got this (i have now changed the acces token
{
"ok": false,
"error": "Not Found",
"device_name": "laser mighty cracker pirate mutant"
}
so i did something totally wrong but what?
hape
It looks like your Photon is not “claimed” or associated with your account and access token.
Sometimes this happens if you use two different email addresses or you didn’t complete the setup process.
If you can’t run the Android or iOS apps or the CLI, you can claim the device using curl. Read about that here:
If you look at the docs requests they look something like this
curl "https://api.particle.io/v1/devices/0123456789abcdef/analogvalue?access_token=123412341234"
Don’t add the backslashes (\) as they only are there as line breaks for display
You need to provide the name of your Spark.variable too (e.g. analogvalue in the sample)
And don’t publicly show your acces token (I removed it from your post)
hi @ScruffR
thx for your help now it works. So yes i have posted my access_token but i changed it before (is that also a problem?)
hape
glad it works for you now.
When you changed your access token, that’s fine too.