Get internet address (public IP/address)

dsnz

Well-known member
hi all
I searched the forums and didn't find any information on how to get the internet IP which I need for some project
(the title of the thread mentions address/internet/public specifically so that future searches can return results since IP/WAN/ISP etc return nothing)

before embarking on a custom solution I wonder to know if other forum members have solved this before and how, so please post your experience
(even if the most obvious solution is a get from a web site that returns IP info, some sites are more reliable, or faster or with output that is easier to parse, so telling the site experience is useful too)
 
Last edited:

dsnz

Well-known member
update:

I forgot to mention that it should be possible to get public address even on VPN, and I mean the real WAN/ISP one and not the VPN one
(perhaps by a different method than when not on VPN)
 

Abalsam

Active member
update:

I forgot to mention that it should be possible to get public address even on VPN, and I mean the real WAN/ISP one and not the VPN one
(perhaps by a different method than when not on VPN)
You want to send an http request to icanhazip.com and save the response to a variable. That will give you the ip address (v4 or v6) it sees your request came from.
 

dsnz

Well-known member
how was this thread moved from General discussion to Feature Request ? 🤔

I don't even think it's a feature request, this needs external communication (websites that provide public IP or communication with internet modem or even mobile connection parameters/information) that I am not sure it should be part of Macrodroid
 

RagenVox

New member
I'm fairly new to this forum, but I stumbled upon your post and thought I could offer some help. I totally understand the struggle of trying to find the best way to get your internet IP address for a project. One website that I have personally used to locate and identify website visitors by IP address is apiip.net. This website provides a simple API that you can use to retrieve your public IP address quickly and easily. I found it to be reliable, fast, and the output was easy to parse. Of course, there may be other websites out there that are just as good, but I thought I'd share my experience with in case it's helpful to you.
 
Last edited:
Top