#43330·dify

Dify Cloud Knowledge API returns HTTP 403 / error 1010 from Google Cloud Shell

Author: brightdocsaiCreated Oct 1, 2026Updated Oct 1, 2026
Labels🐞 bugreview: low

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Dify Cloud (hosted at cloud.dify.ai), Pro plan. Deployed version number unknown.

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. In Dify Cloud, open Knowledge → Service API → API Key.
  2. Create a new API key scoped to the intended knowledge base and copy it immediately.
  3. In Google Cloud Shell, store the key in an environment variable named DIFY_KNOWLEDGE_API_KEY.
  4. Using Python 3 and urllib.request, send a read-only GET request to: https://api.dify.ai/v1/datasets/<DATASET_ID>
  5. Include the request header: Authorization: Bearer <API_KEY>
  6. Observe HTTP 403 with the response body: error code: 1010.

The request was made on September 30, 2026, at approximately 2:19 p.m. CDT (19:19 UTC).

The newly created key was captured as a 32-character value. No API secret is included in this report.

✔️ Expected Behavior

An authenticated request with a valid Knowledge API key should return the requested knowledge base details.

If the key or request is invalid, we expect a structured API error explaining the authentication, permission, or request problem.

❌ Actual Behavior

The request returns:

HTTP status: 403 Response body: error code: 1010

This appears to be a Cloudflare block, but we cannot determine whether the request reaches Dify’s API authentication layer. We have therefore been unable to validate the newly created key or proceed with our approval-to-ingestion integration.

All requests so far have been read-only. No document uploads or modifications have been attempted.

Please investigate this block and confirm the supported configuration for server-side Knowledge API requests from Google Cloud Shell using Python urllib.request.

A potentially related report is: https://github.com/langgenius/dify/discussions/28093

That report also describes a Cloudflare 403 from a Python client, but uses a different endpoint and does not establish the same 1010 error.