Getting User IP address in RASA chatbot - Rasa Open Source - Rasa Community Forum

👋 Introducing the Rasa Playground

Getting User IP address in RASA chatbot

324 views
2 links

post by owl29 on Oct 30, 2023

I want to get the IP address of everyone who is visiting my chatbot. Is it possible?


post by stephens on Nov 1, 2023

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.


post by owl29 on Nov 8, 2023

Hi Stephens,

Thanks for the reply, but I am currently using socketio channel, is there any way to achieve this in socket channels?


post by stephens on Nov 8, 2023

I haven’t looked into that but you can find the source code here.


Related topics

Topic Replies Views Activity
IP address
Tutorials, Resources & Videos
4 595 Apr 2021
How to collect client IP when using RASA as a HTTP server?
Rasa Open Source
1 712 Jan 2019
How to send additional data from Web Page mrbot to actions.py
Rasa Open Source
3 543 Dec 2020
IP address to run Rasa X
[[Deprecated]0m Rasa X Community Edition
4 1.0k Oct 2020
Greeting based on user location
Rasa Open Source
8 1.6k Aug 2020