dify api response with 404 #12437

Closed
opened 2026-02-21 19:07:24 -05:00 by yindo · 3 comments
Owner

Originally created by @gjzhappy on GitHub (Apr 1, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Version 1.1.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. I tested this api, for example:
    Image

  2. I send the request using postman like this:
    Image

but it responsed with 404!

✔️ Expected Behavior

The api should response with the correct info

Actual Behavior

response with 404

Originally created by @gjzhappy on GitHub (Apr 1, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version Version 1.1.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. I tested this api, for example: ![Image](https://github.com/user-attachments/assets/a1629d83-17af-4818-9ac1-4a1ff0f30d55) 2. I send the request using postman like this: ![Image](https://github.com/user-attachments/assets/2f376ec9-1785-4f12-9074-45ab29ebaec1) but it responsed with 404! ### ✔️ Expected Behavior The api should response with the correct info ### ❌ Actual Behavior response with 404
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 19:07:24 -05:00
yindo closed this issue 2026-02-21 19:07:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 1, 2025):

A 404 response in the Dify API can occur for several reasons. Here are some potential causes and solutions:

  1. Incorrect API Endpoint URL: Ensure that you are using the correct endpoint URL. For retrieving basic application information, the correct endpoint is GET /info [1]. If you are using /v1/parameters, it might not be the correct endpoint for the information you are trying to retrieve.

  2. Port Mismatch: If you are running Dify self-hosted, ensure that the API service is running on the correct port. In some versions, a port mismatch can cause a 404 error. Verify that your service is accessible on the expected port [2].

  3. Authentication Issues: Double-check that the Authorization header is correctly set with a valid API-Key. The header should look like this: Authorization: Bearer {API_KEY} [3].

  4. Offline Environment: If you are running Dify in an offline environment, certain endpoints might not be accessible. Ensure that your setup is correct and that you are using a stable release version [4].

Review these points to ensure your setup and request are correct. If the issue persists, consider checking for any additional configuration requirements specific to your setup.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 1, 2025): <!-- Answer --> A 404 response in the Dify API can occur for several reasons. Here are some potential causes and solutions: 1. **Incorrect API Endpoint URL**: Ensure that you are using the correct endpoint URL. For retrieving basic application information, the correct endpoint is `GET /info` <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template.en.mdx)</sup>. If you are using `/v1/parameters`, it might not be the correct endpoint for the information you are trying to retrieve. 2. **Port Mismatch**: If you are running Dify self-hosted, ensure that the API service is running on the correct port. In some versions, a port mismatch can cause a 404 error. Verify that your service is accessible on the expected port <sup>[[2]](https://github.com/langgenius/dify/issues/15991)</sup>. 3. **Authentication Issues**: Double-check that the `Authorization` header is correctly set with a valid `API-Key`. The header should look like this: `Authorization: Bearer {API_KEY}` <sup>[[3]](https://github.com/langgenius/dify/blob/main/web/app/(commonLayout)/datasets/template/template.ja.mdx)</sup>. 4. **Offline Environment**: If you are running Dify in an offline environment, certain endpoints might not be accessible. Ensure that your setup is correct and that you are using a stable release version <sup>[[4]](https://github.com/langgenius/dify/issues/14485)</sup>. Review these points to ensure your setup and request are correct. If the issue persists, consider checking for any additional configuration requirements specific to your setup. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8c1452dc-796f-431a-810b-40dbcb4de18e?feedback_type=other)</sup>
Author
Owner

@gjzhappy commented on GitHub (Apr 1, 2025):

I installed dify by docker, if i request with my local ip, it has the same response

Image

@gjzhappy commented on GitHub (Apr 1, 2025): I installed dify by docker, if i request with my local ip, it has the same response ![Image](https://github.com/user-attachments/assets/0a7965bb-eee2-414a-88ce-c7f93600f68d)
Author
Owner

@gjzhappy commented on GitHub (Apr 1, 2025):

ok, i find the reason, i change the port in docker, so i should change the port in request too

@gjzhappy commented on GitHub (Apr 1, 2025): ok, i find the reason, i change the port in docker, so i should change the port in request too
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12437