Need API to get the details of a feedback #22102

Closed
opened 2026-02-21 20:15:47 -05:00 by yindo · 2 comments
Owner

Originally created by @BeautyyuYanli on GitHub (Feb 5, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Currently I can use /app/feedbacks to get the feedbacks but no coresponding conversation messages. While the /messages API need a user parama which is the session_id of the EndUser object. So currently there are no method to get the details of a feedback.

To solve the problem, it will need an API to get session_id from an end_user_id

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @BeautyyuYanli on GitHub (Feb 5, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Currently I can use /app/feedbacks to get the feedbacks but no coresponding conversation messages. While the /messages API need a `user` parama which is the `session_id` of the `EndUser` object. So currently there are no method to get the details of a feedback. To solve the problem, it will need an API to get `session_id` from an `end_user_id` ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 20:15:47 -05:00
yindo closed this issue 2026-02-21 20:15:47 -05:00
Author
Owner

@BeautyyuYanli commented on GitHub (Feb 6, 2026):

How to get feedback with its conversation details (When #32015 is finished)

Prereqs

  • Have your app’s Service API Base URL (it looks like https://<host>/v1).
  • Have your app API key.
  1. Set environment variables
export DIFY_API_BASE_URL='https://<your-host>/v1'
export DIFY_API_KEY='YOUR_APP_API_KEY'
  1. Fetch feedback list (get the IDs you’ll need)
    Run:
curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \
  "$DIFY_API_BASE_URL/app/feedbacks?page=1&limit=20"

From the JSON response, pick one feedback item in data[] and note:

  • conversation_id (you’ll use it to fetch the conversation messages)
  • from_end_user_id (end user who created the feedback; you’ll use it to look up the end user)
  1. Fetch the end user record (get the “user” identifier)
    Run (replace the placeholder with the from_end_user_id from step 2):
curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \
  "$DIFY_API_BASE_URL/end-users/<FROM_END_USER_ID>"

From the response, copy:

  • session_id (this is the user query parameter required by the messages API)
  1. Fetch the conversation messages (conversation details)
    Run (replace placeholders with the conversation_id from step 2 and session_id from step 3):
curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \
  "$DIFY_API_BASE_URL/messages?conversation_id=<CONVERSATION_ID>&user=<SESSION_ID>&limit=20"

What you get

  • Step 2: feedback metadata + the link to a specific conversation (conversation_id) and who created it (from_end_user_id).
  • Step 3: the end user’s session_id that the messages endpoint requires as user.
  • Step 4: full conversation history (messages) for that conversation ID and user, which gives you the conversation details tied to the feedback.
@BeautyyuYanli commented on GitHub (Feb 6, 2026): How to get feedback with its conversation details (When #32015 is finished) Prereqs - Have your app’s Service API Base URL (it looks like `https://<host>/v1`). - Have your app API key. 1) Set environment variables ```bash export DIFY_API_BASE_URL='https://<your-host>/v1' export DIFY_API_KEY='YOUR_APP_API_KEY' ``` 2) Fetch feedback list (get the IDs you’ll need) Run: ```bash curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \ "$DIFY_API_BASE_URL/app/feedbacks?page=1&limit=20" ``` From the JSON response, pick one feedback item in `data[]` and note: - `conversation_id` (you’ll use it to fetch the conversation messages) - `from_end_user_id` (end user who created the feedback; you’ll use it to look up the end user) 3) Fetch the end user record (get the “user” identifier) Run (replace the placeholder with the `from_end_user_id` from step 2): ```bash curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \ "$DIFY_API_BASE_URL/end-users/<FROM_END_USER_ID>" ``` From the response, copy: - `session_id` (this is the `user` query parameter required by the messages API) 4) Fetch the conversation messages (conversation details) Run (replace placeholders with the `conversation_id` from step 2 and `session_id` from step 3): ```bash curl -sS -H "Authorization: Bearer $DIFY_API_KEY" \ "$DIFY_API_BASE_URL/messages?conversation_id=<CONVERSATION_ID>&user=<SESSION_ID>&limit=20" ``` What you get - Step 2: feedback metadata + the link to a specific conversation (`conversation_id`) and who created it (`from_end_user_id`). - Step 3: the end user’s `session_id` that the messages endpoint requires as `user`. - Step 4: full conversation history (messages) for that conversation ID and user, which gives you the conversation details tied to the feedback.
Author
Owner

@dosubot[bot] commented on GitHub (Feb 6, 2026):

To get feedback with its conversation details via the Dify API, use the following workflow:

  1. Fetch feedbacks with /app/feedbacks to get conversation_id and from_end_user_id.
  2. Use /end-users/<FROM_END_USER_ID> to get the session_id (this is the user parameter for the next step).
  3. Call /messages?conversation_id=<CONVERSATION_ID>&user=<SESSION_ID>&limit=20 to retrieve the conversation messages.

Make sure the conversation and user/session were both created via the API, not the web UI—Dify strictly separates API and web/admin data, so IDs from the web UI or logs won't work with the API endpoints. If you get empty results or a 404, double-check that the session_id and conversation_id are correct and from the API context, and that the conversation isn't deleted or mismatched. There is currently no built-in way to bridge API and web/admin conversations or retrieve web UI feedback details via the public API. For more details, see this discussion and this issue.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 6, 2026): <!-- Answer --> To get feedback with its conversation details via the Dify API, use the following workflow: 1. Fetch feedbacks with `/app/feedbacks` to get `conversation_id` and `from_end_user_id`. 2. Use `/end-users/<FROM_END_USER_ID>` to get the `session_id` (this is the `user` parameter for the next step). 3. Call `/messages?conversation_id=<CONVERSATION_ID>&user=<SESSION_ID>&limit=20` to retrieve the conversation messages. Make sure the conversation and user/session were both created via the API, not the web UI—Dify strictly separates API and web/admin data, so IDs from the web UI or logs won't work with the API endpoints. If you get empty results or a 404, double-check that the `session_id` and `conversation_id` are correct and from the API context, and that the conversation isn't deleted or mismatched. There is currently no built-in way to bridge API and web/admin conversations or retrieve web UI feedback details via the public API. For more details, see [this discussion](https://github.com/langgenius/dify/discussions/28104) and [this issue](https://github.com/langgenius/dify/issues/22537). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8b8349d5-e96a-4da4-923b-63b3d36681df?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=To%20get%20feedback%20with%20its%20conversation%20details%20via%20the%20Dify%20API%2C%20use%20the%20following%20workflow%3A%0A%0A1.%20Fetch%20feedbacks%20with%20%60/app/feedbacks%60%20to%20get%20%60conversation_id%60%20and%20%60from_end_user_id%60.%0A2.%20Use%20%60/end-users/%3CFROM_END_USER_ID%3E%60%20to%20get%20the%20%60session_id%60%20%28this%20is%20the%20%60user%60%20parameter%20for%20the%20next%20step%29.%0A3.%20Call%20%60/messages%3Fconversation_id%3D%3CCONVERSATION_ID%3E%26user%3D%3CSESSION_ID%3E%26limit%3D20%60%20to%20retrieve%20the%20conversation%20messages.%0A%0AMake%20sure%20the%20conversation%20and%20user/session%20were%20both%20created%20via%20the%20API%2C%20not%20the%20web%20UI%E2%80%94Dify%20strictly%20separates%20API%20and%20web/admin%20data%2C%20so%20IDs%20from%20the%20web%20UI%20or%20logs%20won%27t%20work%20with%20the%20API%20endpoints.%20If%20you%20get%20empty%20results%20or%20a%20404%2C%20double-check%20that%20the%20%60session_id%60%20and%20%60conversation_id%60%20are%20correct%20and%20from%20the%20API%20context%2C%20and%20that%20the%20conversation%20isn%27t%20deleted%20or%20mismatched.%20There%20is%20currently%20no%20built-in%20way%20to%20bridge%20API%20and%20web/admin%20conversations%20or%20retrieve%20web%20UI%20feedback%20details%20via%20the%20public%20API.%20For%20more%20details%2C%20see%20%5Bthis%20discussion%5D%28https%3A//github.com/langgenius/dify/discussions/28104%29%20and%20%5Bthis%20issue%5D%28https%3A//github.com/langgenius/dify/issues/22537%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32018)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22102