1
I’m working with the library Ibmwiotp to make a POST
equipment on the IBM Watson Iot Platform.
I have the following code:
public void AddDevice(){
try{
ApiClient client = new ApiClient("a-i7wplp-paqfsd43pem", "bcO9?&jg9Kb4GOTo)&");
var device = new RegisterSingleDevicesInfo();
device.deviceId = "device6";
device.authToken = "defaultToken";
Boolean status = client.RegisterDevice("r3000", device);
}catch(Exception e){
@Info.Trace("AddDevice -> " + e);
}
}
Error appears when the following line is executed:
Boolean status = client.Registerdevice("R3000", device);
The error that returns me is the following:
system.net.webexception: 0: em IBMWIoTP.ApiClient.RestHandler(Method methord, String urlSuffix,
Object param, Boolean parseDynamic, ResRequest customRequest) em IBMWIoTP.ApiClient.RegisterDevice(
String type, RegisterSingleDevicesInfo info) em DeviceManagementSample.SampleDeviceManagement.Main
(String[] args) na C:\Users\caiohr\source\repos\teste2\Program.cs: linha 29
I don’t usually call for help, but I’ve searched and searched everywhere on the Internet and I can’t find anything like it. I look for the solution or any information about, articles or books that can help me.
From now on, thank you very much!