Channel ID doesn't matter during upload data

2 ビュー (過去 30 日間)
Istvan Kurunczi
Istvan Kurunczi 2019 年 11 月 13 日
コメント済み: Istvan Kurunczi 2019 年 11 月 14 日
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

採用された回答

Christopher Stapels
Christopher Stapels 2019 年 11 月 13 日
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 件のコメント
Istvan Kurunczi
Istvan Kurunczi 2019 年 11 月 14 日
OK, THanks for the information.
Br.
Istvan

サインインしてコメントする。

その他の回答 (0 件)

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeWrite Data to Channel についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by