static void Main(string[] args) { //Get your ENV and CPID from the portal key vaults module or visit https://help.iotconnect.io SDK section. string cpId = "14cf4939849c4183ac5c74660ca9ab27", uniqueId = "elephantedge1", env = "Avnet"; if (string.IsNullOrWhiteSpace(cpId)) { Console.WriteLine("cpId can not be blank."); return; } if (string.IsNullOrWhiteSpace(uniqueId)) { Console.WriteLine("uniqueId can not be blank."); return; } //Initialize device sdk client to connect device. client = new SDKClient(cpId, uniqueId, DeviceCallback, TwinUpdateCallBack, env); //Prepare device data with valid format.[Type1] var deviceData = "[{\"uniqueId\":\"<deviceUniqueId>\",\"time\":\"2020-02-14T12:18:23.5499042Z\",\"d\":[{\"humidity\":13}]}]"; //Send data to device using SendData method. client.SendData(deviceData); Console.ReadLine(); }