Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

net::ERR_ABORTED 429 using ipinfo.io only over local host

Tags:

javascript

I wanted to get a IP address from the front end devices. I found this free API called IPINFO.io

As per the documentation to get the IP address using Jquery all I need to do is:

    $.get("https://ipinfo.io", function (response) {
        console.log(response.ip)
    }, "jsonp");

However, I get:

net::ERR_ABORTED 429

I am running this locally using Nodejs. The server does not matter because I am not sending a request to my Nodejs server.

However, if I paste the same code in a codepen with the same jquery version as the one that I have in my Nodejs project it runs just fine.

Why am I getting this error only when I use it over localhost?

like image 328
jedu Avatar asked Oct 25 '25 16:10

jedu


1 Answers

IPinfo.io returns a 429 status if you've been rate limited. The unauthenticated API limits at 1,000 requests per day. See https://ipinfo.io/developers for more details. If you signup for a free account you'll get an access token you can use, and a limit of 50,000 requests per month.

like image 108
Ben Dowling Avatar answered Oct 27 '25 06:10

Ben Dowling