0
votes

Is it possible to open an DirectLine Webchat that has an expired token and see the Conversation from the past?

Opening a Chat that hasn't expired and see its Conversation works fine. But an hour later I still can open the Chat but I cannot see the Conversation in it since the token expired. The only thing I see in the Chat window is No Connection.

enter image description here

I have seen that it is possible to somehow open the chat with an Conversation in it. This chat for example is almost 3 months old. I can see the Conversation but new messages will not be sent (which is fine for me).

enter image description here

1
Accepting / upvoting an answer serves the greater Stack Overflow community and anyone with a similar question. If you feel my answer was sufficient, please "accept" and upvote it. If not, let me know how else I can help!Steven Kanberg

1 Answers

0
votes

First, conversations and conversationId's are stored for no longer than 24 hours in the BotFramework servers. If you are looking to preserve a conversation and be able to recall it at a much later time, then you need to save the conversation, id and token in storage, whether that is CosmosDb, blob storage, or some other type. You can read more about storage in BotFramework here.

That being said, it is possible to persist a conversation in a web chat browser session. This will allow a user to be able to navigate away or reload the page while retaining the conversation. Should the token expire, the conversation still remains but is subject to the above time limitations and storage considerations.

Check out this post for persisting a conversation.

Hope of help!