SDK
- Reference: link
- SDK Platform: Node.js
- SDK Version: 3.14.0
Description
Hello! Several days ago I have been investigating this issue without finding an answer. I would like to know if there is any way to read URL parameters from the user session object of the Microsoft BotFramework for NodeJs
For example, if I access the following URL of my chatbot:
http://localhost:3978/api/messages?pronuntiation=british
Is there any way to read the "pronuntiation" parameter from the "session" object as read below?
bot.dialog("/", function(session){
var desiredPronuntiation = session.someUrlParameters.pronuntiation;
if( desiredPronuntiation == "british"){
///blah
}
});
I know this can be done with the C # SDK, but I really wanted to try to do it with NodeJs ...
I already debugged the flow from server.post('/api/messages', connector.listen())
to% method ChatConnector.verifyBotFramework()
where I ended up seeing that it finally ends up calling a method _this.dispatch(req.body, res, next);
(ChatbotConnector.js on line 149) where the post body is passed but not the object request.
That's why at first glance I do not see it possible, but you know I'm wrong and I wanted to ask if someone knows more about the subject.
Thanks, Luis