Conversation history when using iframe #31348
Replies: 5 comments 12 replies
-
|
Hi @dapicester! I'm Dosu and I’m helping the dify team. To persist conversation history across devices when embedding Dify via iframe, you should:
In summary: use sys.user_id and conversation_id (not sys.conversation_id), ensure both are encoded and match Dify’s records, and avoid mixing API/UI-created conversations for the same user. This should enable chat history to persist across devices. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
@dosu on the first bullet item you say:
But in the summary you say:
Do you mean I need to gzip + base64 encode + uri encode only the |
Beta Was this translation helpful? Give feedback.
-
|
Can a human have a look at this issue? |
Beta Was this translation helpful? Give feedback.
-
|
I wounder if it could be possible to use the |
Beta Was this translation helpful? Give feedback.
-
|
If you need persistent conversation history for embedded chatbots, Arko Studio has it built in -- each chat session is stored and the agent has cross-session user memory. You can access everything via the REST API or embed it however you need. Free tier available with API keys, OpenAI-compatible format. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Hi, I am using the iframe to embed amy workflow in my website. I am using the full iframe, not the balloon.
I want to persist the conversations if I open my website on my laptop and my mobile. That is, when I open my website on my mobile phone I should see the conversation history as it happened on my laptop.
I understand that I need to pass
user_idandconversation_idobtained from Dify as querystring parameters of the iframesrcattibute, properly encoded, gzipped and base64 encoded. I am doing that and I can see those correctly set Dify.The HTML snippet looks like this:
The first time I open the iframe the
user_idis my internal ID, andconversation_idis empty.The workflow calls my API so I can store
sys.conversation_id.The second time I open the iframe
conversation_idhas now the value Dify sent, which looks like a uuid.The problem is that Dify is not showing the chat history when I open the iframe on the second device.
Am I missing something? I am not sure if this is a bug, or if I pass the querystring param as
sys.conversation_idorconversation_id.Beta Was this translation helpful? Give feedback.
All reactions