大家好,我安装了 Teamviewer,希望能够 ping Teamviewer ID 并获得该 PC 状态的响应。
try
{
string accessToken = "xxxxxxxxxxxxxxxxxxxx";
string Version = "v1";
string tvApiUrl = "https://webapi.teamviewer.com";
string address = tvApiUrl + "/api/" + Version + "/various commands from API";
HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
request.Headers.Set("Authorization", "Bearer " + accessToken);
request.Method = "GET";
WebResponse response = request.GetResponse();
return response;
}
catch (Exception ex)
{
MessageBox.Show("Failed to get request with error: " + ex.Message);
return null;
}
这不起作用,因为我没有找到与我在 Teamviewer 中的远程计算机列表相关的任何内容。我想要一种方法来检查我的 Teamviewer 列表中的 PC 是否以编程方式有互联网。提前致谢