Git Product home page Git Product logo

api's People

Contributors

ipapi-co avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

api's Issues

CROSS ERROR

im using this api on checkout while consuming its giving cross error, how i can handle this
my code : let getIP = await axios.get("https://ipapi.co/json/");
// .then(async (response) => {console.log("RESPONSE==>",response)})
geo_data = getIP
? getIP.data
: JSON.parse(localStorage?.getItem("visitor_data"));

Blocked by CORS policy

I'm using the example script at https://ipapi.co/api/?javascript#complete-location5 to use ipapi with javascript. But I get the following error. How do I fix this?

Access to fetch at 'https://ipapi.co/8.8.8.8/json/' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
visitor-test.html:52 
        
GET https://ipapi.co/8.8.8.8/json/ net::ERR_FAILED 403 (Forbidden)

script used:

fetch('https://ipapi.co/8.8.8.8/json/', )
			.then(function(response) {
			  response.json().then(jsonData => {
				console.log(jsonData);
			  });
			})
			.catch(function(error) {
			  console.log(error)
			});

Problems in some browsers

Hi, I'm using your Api to get the user location.

I'm using javascript to get this information like:

fetch('https://ipapi.co/json/')
  .then( resp =>  resp.text())
  .then( data => {
  const {country_code: countryCode} = JSON.parse(data)
  fetch(`https://xxxxxxxxxx.com?country=${countryCode}`)
    .then( response=>  response.json() )
    .then((data) => console.log('some code with ', data));
})

sometimes it works ok and other times wrong.

Sometimes in Google Chrome I have this error: Failed to fetch --> testint with Chrome 38, Chrome81, Chrome80
Sometimes in Opera I have this error: Failed to fetch --> version Chrome67
Normally in Firefox I have this error: TypeError: NetworkError when attempting to fetch resource. --> version Firefox75

Can you help me please?

Thank you

Wrong region code

hi!

thanks for this api, it looks awesome :)

I just found a little bug (i think), the region code for my ip is this https://ipapi.co/81.234.60.162/json/

in the api it's "AB", which is wrong I believe.

It's not a big deal, and I really don't care about it myself, but I just wanted to point it out, in case you guys are parsing any file wrongly, the "AB" could maybe from the organization?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.