When I call inside the cli particle token list i get severall tokens. Some are expired, one is declared “user”, one is “spark-ide”, one “cloud compile” and a lot are “password_only”.
I am working with the ubidots cloud. To retrieve data from particle to ubidots, a token was not required. But as i want to work the other way around as well and publish data from ubidots to events i need a token. Which token shall i take for this?
I think there already is one misunderstanding. You don't retrieve data from Particle to Ubidots. You are sending data from the device to Ubidots via their library. That's why you don't need the Particle token but Ubidots' own API Key as you want access their servers from the "outside world".
The other way round Ubidots (="outside world" for Partilce) needs to be granted access to their servers, hence you need Particle's key (aka access token).
It seems your outgoing (from device to the webhook manager) event is not valid.
Your screenshot above only shows how you instructed Ubidots to send data to Particle.
Your data is shown but it’s not valid JSON.
A valid JSON would look like this
{ "value": 1.0 }
(of course "value" should be the key that you’ve used on the Ubidots side to store the data in)
I understand what u are saying.
I am still stuck on fully understanding the whole framework i think.
My understanding was: I am using the particle board with the ubidots library. THis makes it easier to push data directly to ubidots. For that i also need a webhook configured to ubidots. So in my understanding data is still going through the particle cloud?
Now i am a bit confused.
Maybe this will clear things:
I thought that with the ubidots webhook i was sending data to particle cloud. and from there i would grab it with a subscription to my device. So to check if the first step works, i was just sending the data from ubidots to particle without any device in use.
Particle integrations/webhooks are a means for Particle devices to request data from a remote server. Just like a normal hook goes in one direction and then turns round to come back.
If it would be going one way straight it would hardly be a hook
Particle.publish() (events) would be a one-way thing - pushing data to some remote endpoint.