Reputation: 5649
I want to receive a list of open sessions in Team Viewer via a C# program. I read the Team Viewer API documentation.
As per the documentation, OAuth 2.0 authentication is used to get an access token. But I am not able to understand, how do I pass credential information to it. Just for testing, I also tried to create an access token using Postman Rest API but I am not able to do that as well.
string Version = "v1";
string tvApiUrl = "https://webapi.teamviewer.com/";
string address = tvApiUrl + "/api/" + Version + "/sessions";
HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
//SOMEHOW I HAVE TO ASSIGN CREDENTIAL/AUTHENTICATION TO REQUEST HERE
request.Method = "GET";
WebResponse response = request.GetResponse();
Console.WriteLine(response);
Upvotes: 0
Views: 409