I want to get the IP address of everyone who is visiting my chatbot. Is it possible?
You’d need to customize the channel. If you’re using the REST channel, you’d want to get the IP address here with something like this.
client_ip = request.remote_addr or request.ip
I would then add the IP to the metadata object. You can then use action_session_start
to get the IP.
Another way is to add the IP address to the metadata in your client.
Hi Stephens,
Thanks for the reply, but I am currently using socketio channel, is there any way to achieve this in socket channels?
I haven’t looked into that but you can find the source code here.