How do I Identify client machines
Hi ThingWorx Community,
I'm working on a ThingWorx Mashup and need to uniquely identify the client machine that is accessing the mashup. The goal is to know which specific PC/workstation is running the mashup at any given time.
I've explored a few approaches but hit limitations due to the browser sandbox and the separation between client-side (mashup) and server-side (JavaScript services). I'm hoping someone has solved this or can suggest a better approach.
What I've Tried
- Client IP Address (
CurrentSessionInfo.GetCurrentUserSessionInfo()) — This works, but the IP address can change due to DHCP, VPN, or NAT/proxy, so it's not a reliable unique identifier. URLSearchParams/window.locationin a server-side service — This doesn't work because ThingWorx JavaScript services run on the Rhino engine (server-side), which has no access to browser APIs.
What I'd Like to Do (Any of These Would Work)
-
Read an environment variable from the client machine (e.g.,
%COMPUTERNAME%on Windows) directly from the mashup or a service. -
Read a local file on the client machine (e.g.,
C:\config\machine-id.txt) that contains a unique machine identifier. -
Read the computer name / hostname of the client machine .
My Environment
- ThingWorx version: 9.6.0
- Client machines: Windows 10/11 PCs on a corporate network
Questions for the Community
-
Is there any way for a ThingWorx Mashup (or a custom widget/extension) to read the client machine's hostname or environment variables?
-
Is there a custom mashup extension or widget that can access local system information (hostname, environment variables, etc.)?
What I'm Considering as Workarounds
- A local HTTP service on each client that exposes the hostname on
http://localhost:5111/, which the mashup calls on load.
Any guidance, examples, or pointers to extensions/documentation would be greatly appreciated.
Thank you!

