Json Data to Kodular

Hello , I am having trouble with getting displaying some data from an api call.
So , I am using the web block to make a request with this url (https://ipapi.co/json/)
and this should return the ip,country,city, etc. ( I also used the ParseJSON block & getStringValue ). Problem is that I am not getting any response.
Any ideas would be welcome and much appreciated!
Have a wonderful day!

Is the response empty? Show your blocks.

The first return response content from web1 is a Json, correct ?


That worked ?
I understand that you want to take the country returned by the API and get another return using the current country.

First I call web1 to return the IP of the user.
Then ,I take the response (the IP) and I call a web2 to get information (in JSON) from the site I mentioned earlier.

After I get the response from web2 I parse the data as you can see in the screenshot.

Did you test it directly through the browser?
Did you check the response code?

1 Like

First You don’t have to use two web components for this and why are you using this http://api.ipify.org/. This Return IP Address But you can also get ip address by using this https://ipapi.co/json/ both are same.

Attach aia file

2 Likes


This api returns the ip.

1 Like

Yes I tested it and if you Google the link :
HTTPS://ipapi.co/{IP}/JSON
You get a list of JSON data.

If possible add aia file

2 Likes

I tested and in app the response code was always 429 indicating that the user has sent too many requests in a given amount of time, don’t know why.

Then I tested the other formats like csv and jsonp , the response code was 200 so I played a little with the code and for me it worked like this using https://ipapi.co/jsonp/

2 Likes

But if you use the URL https://ipapi.co/json/ you already get a Json with the IP and the other data. The lp is taken from the device that makes the request.

You can also do as @dora_paz says. With that url you get a json

1 Like

When you use it in app the response code is always 429 and you do not get the json. In browser it works ok

1 Like

I’m sorry, it’s true!
As you say, it works perfectly.

2 Likes

And if I want to locate a specific IP (HTTPS://ipapi.co/{IP}/JSON) and grab the longitude & latitude , will the same logic apply?

This ip between keys will be the IP number. Then normally use the API by sending your ip and it (API) should return the values ​​you want.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.