Need clarity on RASA-X REST API?


I’ve got a couple of questions on RASA-X REST chat API?

1. How do I pass custom params?

For example, to identify a user in a session, I’d like to pass the user_email, user_region, user_language, so that I can serve the user the appropriate response. Currently, I’m using the below API. Also, I’m using a custom action server.

POST /api/chat?environment=production
AUTH BearerToken
BODY {"message":"Hey"}

2. How do I access/store the custom params in the db tables?

The screenshot below is the rasa db tables - conversation and conversation_event in Metabase.

3. How do I use this API without authentication in a chat widget?

I’m able to use the api only with the access_token that I get from the /api/auth endpoint. This results in the “recipient_id” as “me” in the chat response.

1+2: that’s something you’d need to pass in a metadata field from the users side. you would need to create a custom connector though: Custom Connectors

  1. you can use the /webhooks/rasa/webhook endpoint without an API token. /api/auth is just for the Rasa X “talk to your bot” ui.