Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
i tested this code but it not work
sToken est une chaîne UNICODE = "my token"
sUrl est une chaîne UNICODE = "https://api-content.dropbox.com:443/2/files/download"
sAgent est une chaîne UNICODE = "API-explorer-client"
sType est une chaîne UNICODE = "application/json"
smylink = "my link in dropbox space"
sAutho est une chaîne UNICODE = "Authorization: Bearer " + sToken + RC +"{""path"":""download""}"
sDestination est une chaine = "my file in private space"
HTTPDestination(sDestination)
res est un booléen=HTTPRequête(sUrl,sAgent,sAutho,smylink ,sType)
i got in file :
Error in call to API function "files/download": The request body is supposed to be empty, but it isn't; got "h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00d\x00l\x00.\x00d\x00r\x00o\x00p\x00b\x00o\x00x\x00u\x00s\x00e\x00r\x00c\x00o\x00n\x00t\x00e\x00n\x00t\x00.\x00c\x00o\x00m\x00/\x001\x00/\x00v\x00i\x00e\x00w\x00/\x00v\x00z\x00q\x00s\x001\x00j\x00b\x00w\x006\x00"
@MOUHROUH I see that you're trying to use the /2/files/download endpoint to download a file from a Dropbox link. The /2/files/download endpoint is only for downloading files directly from a connected account, not from a link. (The actual error you got when trying to use it is indicating that you submitted data in the HTTP request body, where none was expected.)
Anyway, based on the output, it looks like you have a link of the form 'https://dl.dropboxusercontent.com/1/view/...'. That's an old type of direct link. If you have an active link of that type, you can download from it directly using an HTTPS client, without using the Dropbox API. I.e., issue a GET request to it and if successful, the response body will be the file content.
يبدو أنك ترى مشكلة مختلفة ، لذا يرجى فتح سلسلة محادثات جديدة تتضمن تفاصيل إضافية حتى نتمكن من مساعدتك:
https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014
---
يرجى إعفاء ترجماتنا. تم إنشاء ترجماتنا باستخدام مترجم على الإنترنت. نحن نرغب في دعم كل لغة ، لكننا غير مجهزين حاليًا للقيام بذلك. هنا هو النسخة الإنجليزية:
---
Please excuse our translations. Our translations were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:
---
It looks like you are seeing a different issue, so please open a new thread with additional details so we can help:
https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014
How can i do with direct link?
If you have a direct link to a file, you can download from it directly using a normal HTTPS request. For instance, using curl, saving the data to a local file, that would look like:
curl URL_HERE -o local_file
Exactly how you do that will depend on what HTTPS client you're using, which isn't specific to the Dropbox API, so I can't offer insight on that.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!