Using IP Address in glitch.com projects; need IP Address linked to key

Clash Royale API requires an IP Address for every key I use. What is Glitches’ IP Address?

Oh, and to add to the post, I get this message when I use the IP Address given by

var ifaces = os.networkInterfaces();
  Object.keys(ifaces).forEach(function (ifname) {
    var alias = 0;

    ifaces[ifname].forEach(function (iface) {
      if ('IPv4' !== iface.family || iface.internal !== false) {
        // skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
        return;
      }
      
      if (alias >= 1) {
        // this single interface has multiple ipv4 addresses
        message.channel.send(ifname + ':' + alias, iface.address);
      } else {
        // this interface has only one ipv4 adress
        message.channel.send(ifname, iface.address);
      }
      ++alias;
    });
  });

IP address must not be in private IP address range.


MOD EDIT: formatting

Hey @xetrov05, It would be interesting to know what IP address is being returned from that function and why it’s not being flagged as internal by the function if the API that you’re connecting to sees it as internal.

All of that said, if you need a single, relatively static IP address you’re not going to get that in Glitch’s environment. We host our servers in AWS’s US-East-1 region, but your project can be hosted on any IP address in those ranges, which means it can be one of millions of possible IP addresses. You can use the snippet I provided in What IPs must I whitelist so my Glitch project can access my MongoDB database? to be able to see what the possible ranges might be, but I’m not sure that’s going to be helpful for you.

Sorry for the inconvenience!

Hello, please don’t bump old threads with spam.

4 Likes