Channel ID doesn't matter during upload data
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Istvan Kurunczi
am 13 Nov. 2019
Kommentiert: Istvan Kurunczi
am 14 Nov. 2019
Hi,
I'm working with ESP32 (Arduino IDE) and I noticed that the Channel ID doesn't matter during upload data.
I use ThingSpeak.writeFields() function and I can use any number as Channel ID to do a success upload.
The API Key is important because when I modify it the upload will be unsuccess. Then why I have to give the Channel ID in ThingSpeak.writeFields() function?
ThingSpeak.setField(1, field1);
ThingSpeak.setField(2, field2);
int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
I have found a description about Channel ID next below. Does it mean the Channel ID is used only to read data from the channel?
"Channel ID: Auto-generated ID of your unique channel. Your application uses this ID to read data from the channel. You cannot change its value."
I think for security reason it would be much sefer to use Channel ID and API Key together to upload data. Am I right ?
Thanks,
Br.
Istvan
0 Kommentare
Akzeptierte Antwort
Christopher Stapels
am 13 Nov. 2019
You are correct. It is better for security reasons to provide both the API key and channel ID. Additionally it makes tracking your code easier. For example, I have several devices writing to different channels. It is hard to look up the channel by API key, but you can use the channel ID to easily find the channel in your ThingSpeak account.
Weitere Antworten (0)
Communitys
Weitere Antworten in ThingSpeak Community
Siehe auch
Kategorien
Mehr zu Write Data to Channel finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!