Repository navigation
Replies: 2 comments 1 reply
|
Cloudflare 403 errors like this often mean your request was blocked by anti-bot or security rules before it even reached the Dify API. This can happen if Cloudflare thinks your request is automated or suspicious, which is common with scripts that don't look like browsers. A few things to try:
If you still get blocked, include the Cloudflare Ray ID in your report to Dify support so they can investigate further. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
0 replies
|
Where do I send ray id: 99d0e15b6f2408e6 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Trying to upload file via Python to run workflow but getting this weird cloudflare error
Traceback (most recent call last):
<title>Attention Required! | Cloudflare</title> <style>body{margin:0;padding:0}</style> <script> if (!navigator.cookieEnabled) { window.addEventListener('DOMContentLoaded', function () { var cookieEl = document.getElementById('cookie-alert'); cookieEl.style.display = 'block'; }) } </script>File "C:\Users\SamuelWang\PycharmProjects\PythonProject\dify_test.py", line 182, in
main()
~~~~^^
File "C:\Users\SamuelWang\PycharmProjects\PythonProject\dify_test.py", line 158, in main
file_id = upload_file(FILENAME)
File "C:\Users\SamuelWang\PycharmProjects\PythonProject\dify_test.py", line 76, in upload_file
raise Exception(f"Failed to upload file: {response.status_code} {response.text}")
Exception: Failed to upload file: 403
Sorry, you have been blocked
You are unable to access dify.ai
Here is my function:
def upload_file(file_name):
upload_url = "https://api.dify.ai/v1/files/upload"
headers = {"Authorization": DIFY_API_KEY}
2. Additional context or comments
No response
All reactions