Hello, I am using the API to view specific device ID's, and to claim devic ID's. I can view specific device ID's just fine using this:
var client = new RestClient("https://api.particle.io/v1/devices/" + _photonSerialNumber + "?access_token=" + _particleAPIToken);
var request = new RestRequest(Method.GET);request.AddHeader("Accept", "application/json;");
request.AddHeader("Content-Type", "application/json;");IRestResponse response = client.Execute(request);
This works just fine. However, when I try to claim devices, I always get the error message "data.deviceID is empty":
var client = new RestClient("https://api.particle.io/v1/devices?id=" + _photonSerialNumber + "&access_token=" + _particleAPIToken);
var request = new RestRequest(Method.POST);request.AddHeader("Accept", "application/json;");
request.AddHeader("Content-Type", "application/json;");IRestResponse response = client.Execute(request);
Notice the error is references "deviceID" and not "id". So I tried "deviceID" as well. I've tried adding "id"/"deviceID" as parameters in the body, and I get the same error messages. When I put the access_token in the body instead as a query string I get error that its an invalid access_token... so the access_token only works as a query string apparently.
Any idea what might be my problem? Thanks and any help is greatly appreciated!