Hello, I created a socket.io channel and I am sending from my front side socket.emit( user_uttered,{ access_token: token, message: newMessage, session_id:'sender_id_io, }) I want to get the value of data[‘access_token’] in my custom action. What modifications and imports should I add ? Thanks.
hey, can you show the code that how are you sending the emit code from front-end?
In your custom action code, you need to handle the incoming socket event and crm data enrichment. Below is an example in Python. Adjust it based on your programming language if you are using something else. from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher
class YourCustomAction(Action): def name(self) → Text: return “your_custom_action”
def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
# Retrieve the value of 'access_token' from the tracker
access_token = tracker.get_slot("access_token")
# Now you can use the access_token as needed in your custom action logic
# ...
return []