Skip to main content
13-Aquamarine
July 6, 2026
Question

How do I Identify client machines

  • July 6, 2026
  • 1 reply
  • 3 views

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.location in 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)

  1. Read an environment variable from the client machine (e.g., %COMPUTERNAME% on Windows) directly from the mashup or a service.

  2. Read a local file on the client machine (e.g., C:\config\machine-id.txt) that contains a unique machine identifier.

  3. 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

  1. Is there any way for a ThingWorx Mashup (or a custom widget/extension) to read the client machine's hostname or environment variables?

  2. 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!

1 reply

Rocko
19-Tanzanite
July 7, 2026

I have no solution, but just wanted to remind that the browser sandbox is there for a reason. If ThingWorx could do this, ANY website could do this. You wouldn’t want any website to access your local files or identify the machine they’re talking to.

Maybe your usecase is better covered with a local client pushing data to ThingWorx than a browser.

Your local http service idea may not work because of CORS, but you can try.