In order to use the REST API, you need to authenticate with our servers using HTTP Basic Authentication. Please consult relevant documentation for how to supply Basic Authentication on all REST requests.
For a username, you need to obtain an API key for your organization. This can be found on your dashboard, after clicking "Account Settings", and then "API Access". Use "x" or any other character as your password (this is ignored).
We have provided a C# sample to give you a general idea of how this would work using the standard .NET HTTP stack (the WCF REST Starter Kit is definitely a simpler way of consuming RESTful services from .NET)
static string BASE_URL = "https://api.devicemagic.com/organizations/YOUR_ORGANIZATION_ID_GOES_HERE";
static string USER_NAME = "YOUR_API_KEY_GOES_HERE";
static string PASSWORD = "x";
static void Main(string args)
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(BASE_URL + "/devices.xml");
string authInfo = USER_NAME + ":" + PASSWORD;
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
req.Headers["Authorization"] = "Basic " + authInfo;
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
Stream s = response.GetResponseStream();
StreamReader reader = new StreamReader(s, Encoding.UTF8);
string content = reader.ReadToEnd();
Your output should look something like the following (depending on how many devices you have joined to your organization):
Be sure to authenticate in a similar way for other API requests.