MATLAB Answers

Unable to write data to ThingSpeak , HTTP error 400

26 views (last 30 days)
Otto Meier
Otto Meier on 6 Jan 2020
Hello,
I am trying to transfer data by using program "Typical Write Example" running on ESP8266 NodeMCU. I didn't change he program , only added my Network name, network password, channel number and APIWriteKey. The Program is running on ESP8266 or ESP32. In both cases the response is always "400".
Don't have more detailed information.
Any idea on the cause ? Router problem , Arduino IDE 1.8.10 or ?
Any comment is appreciated.
Kind regards

  0 Comments

Sign in to comment.

Answers (2)

Vinod
Vinod on 6 Jan 2020
Hello Otto,
Can you start from one of the examples in the library here: https://github.com/mathworks/thingspeak-arduino
Are you getting 400 status codes for those examples?
-Vinod

  1 Comment

Otto Meier
Otto Meier on 6 Jan 2020
Hello Vinod,
many thanks for your fast response.
I tried just the example "Typical Write Example" and it responses only 400 status code.
Otto

Sign in to comment.


Christopher Stapels
Christopher Stapels on 6 Jan 2020
Can you try to update your channel from a web browser? Use the format
Does that work?

  9 Comments

Show 6 older comments
Otto Meier
Otto Meier on 6 Jan 2020
I just copied the the API Request from the "API Keys " -pages in the browser and got following responses:
first enter : 1
2nd enter: 2
3rd enter: 3
is this the response you are expecting?
But cannot see any difference to the previous commands
Otto Meier
Otto Meier on 6 Jan 2020
I guess I could solve the problem:
Write API Key contains a "O" and I typed a "0" (Zero). Sorry , I did not recognize !!!
That was the difference why the copied command from the API request which worked.
Many thanks for your patience and best regards from Germany

Sign in to comment.

Sign in to answer this question.

Products