[SOLVED] Can we identify user's IP address?

I need this to compute the sales tax based on their zip code.

Using their IP address, we try to compute their zip code to compute US sales tax.

So the question is how we can identify user’s IP address?

we found a service

using System;
using System.Net;

namespace Ipify.Examples {
    class Program {
        public static void Main (string[] args) {
            WebClient webClient = new WebClient();
            string publicIp = webClient.DownloadString("https://api.ipify.org");
            Console.WriteLine("My public IP Address is: {0}", publicIp);

Above are the code snippets they provide to retrieve IP, but I don’t know how I can use this in playcanvas, since we don’t have WebClient function. T.T

Any help would be appreciated!

SalesTax.prototype.getIP = function() {

var webClient = new System.Net.WebClient();
        let publicIp = webClient.DownloadString("https://api.ipify.org");
        Console.WriteLine(" My public IP Address is: {0}", publicIp);


I tried the above, Playcanvs complained it doesn’t have System!

pc.http.get(“https://api.ipify.org”, { “retry”: true, “maxRetries”: 5 }, function (err, response) {});

This worked.