Is there any way to use visitor IP addresses in conditional logic?

tl;dr I’ve searched the app and all documentation, and I can’t seem to find a way to make use of a visitor’s IP address within Bubble. Can it be done?

More specific context: The application I’m building has a very competitive head-to-head voting element and I need to be able to block multiple vote attempts by the same IP address. I know I can block 2nd+ vote attempts for a given logged in user, and I believe that Bubble identifies anonymous users by cookie so that I can also block 2nd+ vote attempts for a given anonymous user as long as she doesn’t clear her cookies. But unfortunately that’s not tight enough control for my application, where visitors have many times in the past (using 3rd party polling services) shown their willingness to vote, clear cookies, revote, clear cookies, revote, clear cookies, etc. to support their choice before I minimized that behavior by blocking 2nd+ vote attempts by IP address. So, whether it is IP address or some other means, I need something a bit tougher to circumvent than cookies to make my application work successfully using Bubble.

Thoughts? Thank you in advance for any ideas.


May it help you ?

Thanks @NicolasDap, at this stage i am waiting for blockspring determine Ip to be available through bubble. any idea when the blockspring matters will be sorted out?

We’re working on it. Prob a week away, but can’t commit on this.

Is there a way to do this yet?

I’m trying to display elements based on the current users IP to address.

Any news? :satellite:

is it really impossible to get IP of user? should be so easy and would add some more flexibility …

I wrote up an example of how to do this over here How do i store a calculated IP in a custom state? :slight_smile:

cool, thanks, will try to use

That’s correct, you can use the Ipify plugin to get the IP address of the user, just as @philip provided in his example.

1 Like

Great example. But I am worried about the IPs being stolen. Can I encrypt it?