I am trying to use "Bulk-Write JSON Data" API to send some data to my ThingSpeak channel: https://www.mathworks.com/help/thingspeak/bulkwritejsondata.html
My channel has four fields: "Temperature", "Pressure", "Humidity", "CO2"
My POST query looks like this:
POST /channels/XXXXXX/bulk_update.json HTTP/1.1Host: api.thingspeak.comContent-Type: application/json{ "write_api_key": "XXXXXXXXXXXXXXXX", "updates": [{ "created_at": "2018-06-21 22:21:40 +0300", "Temperature": "27.51", "Pressure": "746.02576", "Humidity": "42.407", "CO2": "978" } ]}
But server returns response:
{ "status": "400", "error": { "error_code": "error_bad_request", "message": "Bad Request", "details": "The request cannot be fulfilled due to bad syntax." }}
What is wrong?
Best Answer