Skip to main content
Version: 8.3 Beta 🚧

system.vision.getExternalIpAddress

Backwards Compatibility

This function replaces system.net.getExternalIpAddress. Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. Only the system.vision variations will appear in the Script Editor's autocomplete popup.

This function is used in Python Scripting.

Description​

Returns the Client's IP address, as it is detected by the Gateway. This means that this call will communicate with the Gateway, and the Gateway will tell the Client what IP address its incoming traffic is coming from. If you have a client behind a Network Address Translation (NAT) router, then this address will be the Wide Area Network (WAN) address of the router instead of the Local Area Network (LAN) address of the Client, which is what you'd get with system.net.getIpAddress.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.vision.getExternalIpAddress()

Parameters​

Nothing

Returns​

String - A text representation of the client's IP address, as detected by the Gateway

Scope​

Vision Client

Code Examples​

Code Snippet
# Put this script on a navigation button to restrict users from opening a specific page.

ip = system.vision.getExternalIpAddress()
# check if this matches the CEO's IP address
if ip == "66.102.7.104":
system.vision.swapTo("CEO Dashboard")
else:
system.vision.swapTo("Manager Dashboard")