1

I am having a very strange issue with ipinfo.io. This is the code I use to call ipinfo (in order to catch location data on user signup process):

$.ajax({
                url: "http://ipinfo.io/json",
                type: 'GET',
                datatype: 'json',
                async: false,
                success: function(data) {
                    if(data) {
                        console.log(data)
                    }
                }
            })

That code is present in my html (.hbs) file, and I run the entire thing through node on localhost:3000.

Every single time I get error 429: too many requests

When I create manually a simple html file and run it, it works like charm, but not when I host it in my app (localhost:3000/users/signup) This is very strange since I am pretty sure that from the code, it is called only once.

  • Have you tried making fewer requests? It sounds like the API is upset you've made too many requests and you need to chill out for a bit. If you've been blacklisted, consider alternatives like [Ipify](https://www.ipify.org). – tadman Apr 20 '19 at 18:39
  • As I said, I can make normal requests, both through simple html files, and via curl. It doesn't seem that I was blacklisted in any way – Александар Стјепановић Apr 20 '19 at 18:40
  • Use the process of elimination here. Is it `ipinfo.io`? Is it your code? Try another service to see if it works. Watch your error console in your browser very closely. – tadman Apr 20 '19 at 18:42
  • this appears to have been the reason in a case I ran into, https://stackoverflow.com/questions/31704941/the-server-responded-with-a-status-of-429-too-many-requests-intltelinput-js – jess May 21 '20 at 16:24

0 Answers0