Published
- 1 min read
how to get ip address in javascript
The solution for this is noted below
how to get ip address in javascript
Solution
fetch('https://api.ipify.org/?format=json')
.then(response => response.json())
// Returns
{
"ip": "user_ip"
}
Try other methods by searching on the site. That is if this doesn’t work