I have a problem with integrating Ubidots to Particle, I followed the tutorial but I can’t get it to work, I’m getting an error:
“error status 400 from industrial.api.ubidots.com”
Here is my integration example on Particle:
{
"event": "ubidots",
"url": "https://industrial.api.ubidots.com/api/v1.6/devices/{{{PARTICLE_DEVICE_ID}}}",
"requestType": "POST",
"noDefaults": false,
"rejectUnauthorized": true,
"headers": {
"X-Auth-Token": "MY_TOKEN",
"Content-Type": "application/json"
},
"body": "{{{PARTICLE_EVENT_VALUE}}}"
}
and here is the sample of my Argon code:
long randNumber;
void setup()
{
Particle.function("controlPnl", controlPnl);
Particle.connect();
}
void loop()
{
}
int controlPnl(String command)
{
if (command == "temperature")
{
randNumber = random(90);
Particle.publish("ubidots", String(randNumber), PRIVATE);
}
return randNumber;
}
Please advise, thank you