Server responded with status 429 (too many requests) intlTelInput.js

I am using intlTelInput.min.js to search for geo IP using this code

jQuery("#teephnumber").intlTelInput({ allowExtensions: true, defaultCountry: "auto", setNumber: "Telephone number", geoIpLookup: function(callback) { $.get('http://ipinfo.io', function() {}, "jsonp").always(function(resp) { var countryCode = (resp && resp.country) ? resp.country : ""; callback(countryCode); }); }, nationalMode: false, utilsScript: "/wp-content/themes/imc/js/utils.js" }); 

it worked fine, but now not in the console I see this error:

 The server responded with a status of 429 (Too Many Requests), GET http://ipinfo.io/?callback=jQuery1112025137682701461017_1438183879450&_=1438183879451 

And no javascript code is working because of this. What could be the reason for this?

+4
source share
1 answer

See betting limits here: https://ipinfo.io/developers

"You are limited to 1000 API requests per day. If you need to make more requests or get SSL support, see our paid plans."

I think you need to pay more requests or find a way to reduce the number of requests you make. Perhaps you can cache the location, so you only ask once for each user using localstorage.

+1
source

All Articles