The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.



Go to last post Go to first unread
#1 Posted : Saturday, February 3, 2018 6:02:27 AM(UTC)

Rank: Guest

Joined: 2/3/2018(UTC)
Posts: 1
United States
Location: Atlanta, GA


I've seen this thread posted a few times, but I've yet to find an answer that fully satisfies my needs. Generally speaking, if I were to integrate with an application, their API integration would look something like this:


using ScreenConnectAPILib;

public void CreateSession(string ID, string APIKey)
    ScreenConnectSession scs = new ScreenConnectSession(ID, APIKey);

From what I've seen, ScreenConnect doesn't have an official library to integrate with C#... although, it's entirely possible that I'm just not understanding how this integration works. I've already read all of the documentation, but it doesn't make much sense for me considering what I'm trying to do.

I'd like to have a desktop-based application that loads a list of my unattended "access" sessions. When I select a user and press, "Connect," it'll launch a remote access session.

Is there any official documentation walking someone through the process?

Thank you.

EDIT: I should also mention that I'm currently on the free package, so I don't have access to create extensions and play with the APIs. Maybe it'll make more sense once I purchase a license?

Edited by user Saturday, February 3, 2018 6:09:44 AM(UTC)  | Reason: Not specified

#2 Posted : Tuesday, February 6, 2018 2:33:26 PM(UTC)

Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,862
United States

Thanks: 3 times
Was thanked: 351 time(s) in 303 post(s)
So our Extension and Integration model is generally based around the server, as in we don't have dlls/libraries created/available to be loaded into wpf/winforms/whatever desktop clients.

So, with this in mind, I can recommend the following course of action:
1. Create an Extension containing a WebService method that returns an array of objects that contain relevant information about each Access session. An example method would look similar to:

public object[] GetAccessSessionInfos()
	return SessionManagerPool.Demux.GetSessions()
		.Where(_ => _.SessionType == SessionType.Access)
		.Select(s => new{
			SessionID = s.SessionID,
			Name = s.Name,
			CustomPropertyValues = s.CustomPropertyValues,
			GuestLoggedOnUserName = s.GuestInfo.LoggedOnUserName,
			GuestLoggedOnUserDomain = s.GuestInfo.LoggedOnUserDomain,
			GuestIdleTime = WebExtensions.GetClientScriptDurationSeconds(s.GuestInfo.LastActivityTime, DateTime.UtcNow),
			GuestOperatingSystemName = s.GuestInfo.OperatingSystemName,
			GuestOperatingSystemVersion = s.GuestInfo.OperatingSystemVersion.ToShortString()

The above method does not have any authentication, so you might want to include a 'token' of some kind and then check for it in the Extension.
What it does do, however, is obtain a list of objects containing specific information about every Access session on your server. You can find a solid list of other available properties within the documentation, available here.

2. Your client side application would receive the above data and display it however you want. Since you want to be able to Join a session, you would have to generate an Access token using the server's crypto manager. There isn't any specific documentation about this of which I'm aware, but you can look at a few Extensions to see how it's done, namely the ScreenConnector extension or Remote Workforce. I believe the methods are named GetLaunchUrl (or something very similar).

3. Assuming that you're running on Windows (and writing in C#), you can call the ClickOnce runtime directly and pass in the LaunchUrl obtained in the previous step. Just include the following dll:

[DllImport("dfshim", CharSet = CharSet.Auto)]

And then make the call into ClickOnce with:

Program.ShOpenVerbApplication(IntPtr.Zero, IntPtr.Zero, launchUrl, 0);

Maybe it'll make more sense once I purchase a license?

Maybe, but at least you can sign up for a Trial to take a look at what Extensions there are. Shoot an email to our sales team at sales@screenconnect.com and they can help you with that.
ScreenConnect Team
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.