Is it possible to load previous conversation with the bot in web chat using microsoft's azure bot framework? For example: If the user has a conversation with the bot which has 15 messages in total and then the user decides to refresh the page. Can the chatbot automatically load the previous 15 messages of the transcript while maintaining the state.
Currently, I'm trying to save the conversation id as a cookie and load that value of the cookie on to the chat. So every time the directline session loads, I pass the conversationId as well as watermark parameter.
window.WebChat.renderWebChat(
{
directLine: window.WebChat.createDirectLine({
secret: '{{DLToken}}',
webSockets: true,
conversationId: chatId,
watermark: "0"
}),
styleSet,
store,
renderMarkdown: markdownIt.render.bind(markdownIt),
},
document.getElementById('webchat')
);
For this I'm getting a 403 error: {code: "BadArgument", message: "Security token not valid for this conversation"}