We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
MOUHROUH
7 years agoExplorer | Level 3
How to download file with windev?
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 = "...
Greg-DB
Dropbox Community Moderator
7 years agoMOUHROUH 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.
MOUHROUH
7 years agoExplorer | Level 3
How can i do with direct link?
- Greg-DB7 years ago
Dropbox Community Moderator
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
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!