Determine users country by ip

Ali, did you try it? In my case it returns always the same result for country/state/city which is US
OR
Boardman
means that probably the ipify plugin doesn’t work correctly.
Please let me know

Works fine here.

Have look and test here

Or run it here
https://publictestapp.bubbleapps.io/version-test/ip?debug_mode=true

Take a look at the plugins also. You have to use the ipify plugin in the BB block

1 Like

Yes, that’s exactly how I implemented also, but the strange thing is this one:
In the debugger it shows the correct values. look:

but in the database it saves some default ones (same every time), and also when i send this values over email, it also sends the default ones
see here:

@georgeciobanu @emmanuel any clue?

Is this the same issue as the random number generator generating a front end and a back end number ?

So…Bubble does two calls to ipify … one on the “front end” that shows the browser IP. The back end does another call that it stores in the database which is the back end server IP adddress. Amazon has a cloud server in Boardman, Oregon ?

Like Schrodinger’s cat … as soon as you try to persist the IP address … it flips to the Server ? Maybe ?

(pure speculation of course).

I added a couple more text boxes to call the Country and Country iso.

I get the right IP and City (Valencia, Spain), but the wrong Country and Country iso… both show US. Any idea why??

You had something weird in the parameters …

You need to pass it the result of the API.

It works now. I get UK and GB on the page.

2 Likes

Excellent! Thank you!!

However … this is exactly the same issue as the Blockspring randomiser.

Click the “save it” button. You will see the “browser IP” appear quickly, then it will be overwritten by the servers copy.

Even if you go via a custom state, you can’t trick the back end :frowning:

Hi!
Could you please clarify if the message is displayed in English only or also in other languages? The privacy policy link should pass a language identifier in order to display the privacy policy in the appropriate language (browser or User options).
Apologies if the question might look stupid as I’m a newbie Bubbler :slight_smile:
Regards
Mario

ipify doesn’t exist anymore?

Certainly does:

1 Like

Works, Great man. I appreciate it from all of you!

Noted! :ok_hand: