Hi -
Hoping someone can point out what I am doing wrong. I am setting up a new webhook to send data to @Blynk. I have done this before, several times in fact but for some reason something is amiss this time.
First check, yes... I have the Blynk-stuff right at the top of my firmware. For the sake of clarity, I am leaving my auth token exposed, will change it later.
#define BLYNK_TEMPLATE_ID "TMPL4doYO7xzH"
#define BLYNK_TEMPLATE_NAME "Smart Pot"
#define BLYNK_AUTH_TOKEN "Nmjfq45ZMWASwdD6IXEQMx1x0xj4hYvC"
const char *WEBHOOK_NAME = "Blynk_Send"; // Particle Webhook name
This is where I actually construct and send the message:
void publish () {
snprintf(data, sizeof(data)
, "{\"t\":\"%s\",\"sun_light_level\":%i\"soil_level\":%i}"
, BLYNK_AUTH_TOKEN, sun_light_level,soil_level
);
Particle.publish("Send_smartpot_data", data, PRIVATE);
}
This is the message I get from Particle events:
{"t":"Nmjfq45ZMWASwdD6IXEQMx1x0xj4hYvC","sun_light_level":0"soil_level":0}
Now comes the problem. The webhook keeps failing with the the following response.
HTTP/1.1 400 Bad Request
connection: keep-alive
content-type: application/json;charset=utf-8
access-control-allow-origin: *
content-length: 42
{"error":{"message":"No token provided."}}
Digging deeper I noticed the following.
EVENT:
HTTP/1.1 400 Bad Request
connection: keep-alive
content-type: application/json;charset=utf-8
access-control-allow-origin: *
content-length: 42
{"error":{"message":"No token provided."}}
REQUEST:
GET /external/api/batch/update?token=&V0=&V1= HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/webhooks)
host: fra1.blynk.cloud
Connection: keep-alive
For the life of me, I do not know why the Auth token is not passed.
I really hope I am missing something very obvious....
Regards,
Friedl.