link icon
Ask The Community

TeamViewer is one of the winners of the European Customer Centricity Award 🥳

Please find more information here.

list device reports with API

fla Posts: 4 ✭✭

I try to list all devices via the API and get an unauthorized message in C#. I have already a corporate license for v12.

string accessToken = "xxxxxxxx";
string tvApiBaseUrl = "";
string address = tvApiBaseUrl + "/api/v1/reports/devices/";

// Create the web request
HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
request.Headers.Add("Authorization", "Bearer " + accessToken);
request.Method = "GET";
WebResponse webResp = request.GetResponse();