I want to setup a slash command /ip that could give me the ip of current logged in user. I tried setting up same but whenever I try to use /ip it gives this as output which is definitely not my public ip(this keeps changing). it is actually giving ip of slack server's.
I am using this service to get ip. I know I can get the user's ip through this, but I want an alternate for this paid feature.
I have been able to achieve this by looking the user id up in the slack accessLog api, you can then find the last login ip of the user, but you will need admin scope token.
The Slash Command URL that you are hosting is invoked by the Slack Servers for you, in response to a message in your team. So the IP address that you are interpreting is that of the Slack Server and not of your machine.
I am not sure if what you want to achieve is going to be possible since Slack Infrastructure is in the middle interpreting your commands and calling external integrations (like your Slash Command URL).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With