Retrieve client IP in retool

Hi All,
we're trying to put users' activities into logs (mySQL table at the moment).
Is it possible to get client IP on retool level to let it also be written into logs?

@mtroinin

Hey there :wave:

There is no built in way to accomplish this in Retool. Do you have another way to get the IP address from the client?

What do you mean under "another way"? I want to use it for analytical purposes and users shouldn't enter it manually

@mtroinin

Unfortunately since there is no way to access the IP addresses of the users in Retool the only option would be gathering that information manually.

you can add this code in js query

var ip = fetch('https://api.ipify.org/?format=json')
  .then(response => response.json())
// Returns 
return ip
4 Likes