Channel ID doesn't matter during upload data

2 vues (au cours des 30 derniers jours)
Istvan Kurunczi
Istvan Kurunczi le 13 Nov 2019
Commenté : Istvan Kurunczi le 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

Réponse acceptée

Christopher Stapels
Christopher Stapels le 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.
  1 commentaire
Istvan Kurunczi
Istvan Kurunczi le 14 Nov 2019
OK, THanks for the information.
Br.
Istvan

Connectez-vous pour commenter.

Plus de réponses (0)

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Write Data to Channel dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by