Channel ID doesn't matter during upload data
2 views (last 30 days)
Show older comments
Istvan Kurunczi
on 13 Nov 2019
Commented: Istvan Kurunczi
on 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 Comments
Accepted Answer
Christopher Stapels
on 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.
More Answers (0)
Communities
More Answers in the ThingSpeak Community
See Also
Categories
Find more on Write Data to Channel in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!