Get device geolocation (city, country) by public IP.
Script Get Geolocation
- Version 18.104.22.168 – API change. Added API key and HTTPS enabling input parameters
- Version 22.214.171.124 – Initial release
Retrieves the device geolocation (city, country) by public IP.
Execution context and suggested scheduling
Run the script manually as interactive user.
|1||API Key||API key to be used for the external geolocation service|
|2||Enable HTTPS||HTTPS enabled (true/false)|
|3||Maximum Delay In Seconds||Maximum random delay set to avoid external API overload. Provide number of seconds|
|1||Device Location||String||City and country where the device is located|
The script is designed to use IPAPI geolocation API (https://ipapi.com/). This is a third-party API, hence its availability does not depend on Nexthink.
- Service restrictions may apply depending on the user API account type (free, business, etc.). Check https://ipapi.com/product for further information
- HTTPS may not be available for all the user plans (e.g. free plan)