We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
amit-kumar
7 years agoExplorer | Level 4
Dropbox download api is not working
Dropbox download is not working, we are getting this error message 'service unavailable' with error code 503.. what is the alternative of this API.
Api endpoint: https://content.dropboxapi.com/2/sharing/get_shared_link_file
15 Replies
- Greg-DB7 years ago
Dropbox Community Moderator
Thanks for the report! I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including the relevant code snippet(s)
- the full text of the error/any output
- amit-kumar7 years agoExplorer | Level 4
Thanks for reply!
1. we are using php 5.6 and using dropbox apis with guzzle (php package)
2. the steps to reproduce issues, guzzle requests are given below:(a) get file listing by using api files/list_folder get file id from response
Dropbox api url:https://dropbox.github.io/dropbox-api-v2-explorer/#files_list_folder
Our Code
$response = $this->request->post('https://api.dropboxapi.com/2/files/list_folder',
['json' => [
"path" => parent_id
"limit" => limit,
]]);
(b) get preview url from this api response sharing/get_file_metadata
Dropbox api url:https://dropbox.github.io/dropbox-api-v2-explorer/#sharing_get_file_metadata
Our Code
$response = $this->request->post('https://api.dropboxapi.com/2/sharing/get_file_metadata', ['json' => [
'file' => 'file_id',
]]);(c) call another api sharing/get_shared_link_file
Dropbox api url:https://dropbox.github.io/dropbox-api-v2-explorer/#sharing_get_shared_link_file
Our Code
$response = $this->request->post('https://content.dropboxapi.com/2/sharing/get_shared_link_file');3. after calling above api(c) we getting the error
Error:503 - Greg-DB7 years ago
Dropbox Community Moderator
Thanks! That's helpful. We'll look into it.
Note that if you just want to download the file though, and you are already connected to the account and have the file ID or path, you don't need to use /2/sharing/get_file_metadata and /2/sharing/get_file_metadata.
Once you know the file ID or path (from the /2/files/list_folder result), you can then call /2/files/download to download the file.
- amit-kumar7 years agoExplorer | Level 4
Thanks!
yes, its working. But we are unable to download shared files by calling https://dropbox.github.io/dropbox-api-v2-explorer/#files_download api. getting error
{
"error_summary": "path/not_found/",
"error": {
".tag": "path",
"path": {
".tag": "not_found"
} } }
- Greg-DB7 years ago
Dropbox Community Moderator
You should be able to download a file from a connected Dropbox account using /2/files/download the same way regardless of whether or not the file is in a shared folder. E.g., you should pass in the 'path_lower' or 'id' value for the file you want as the "path" parameter.
What exactly are you passing in when you get this unexpected error, and where did you get the value?
- amit-kumar7 years agoExplorer | Level 4
Thanks!
(a) get shared file listing by using api sharing/list_received_files get file id from response instead of path_lower
Dropbox api url:https://dropbox.github.io/dropbox-api-v2-explorer/#sharing_list_received_files
Response:
{ "entries": [ { "access_type": { ".tag": "viewer" }, "id": "id:8bMGXkXlCLAAAAAAAAAKzg", "name": "1543493331_1710348706_235215.jpg", "policy": { "acl_update_policy": { ".tag": "editors" }, "shared_link_policy": { ".tag": "anyone" }, "viewer_info_policy": { ".tag": "enabled" } }, "preview_url": "https://www.dropbox.com/scl/fi/ns29hn0d7b5u2hwken9bn/154349385331_1710348706_23515.jpg?dl=0", "time_invited": "2019-01-17T07:03:16Z" } ], "cursor": "CmgKFkctNkpkRjFzQkNBQUTEDFBQUFBQUFBQXcQABpMAzJJbGlzdF90eXBlRGxpc3RPbGlzdGFyZ3NfYnlfZ2lkMRgb7ol0XWwEIAMzRGRlc2MCRWxpbWl0gUhyZXZpc2lvbgchdaO3ApF6FRAB" }
(b) Then we pass id as the "path" parameter.
Dropbox api url:https://dropbox.github.io/dropbox-api-v2-explorer/#files_download
Response
{ "error_summary": "path/not_found/.", "error": { ".tag": "path", "path": { ".tag": "not_found" } } }
- Greg-DB7 years ago
Dropbox Community Moderator
Thanks! That's helpful. Apologies for the trouble. I meant that you should be able to pass in the id for a file as retrieved from /2/files/list_folder, like in your original post, even if they're in a shared folder in the account, for instance.
The files listed from /2/sharing/list_received_files aren't actually in the connected account (they're actually in the sharer's account), so the /2/files/download call won't work in this scenario. I'll ask the team to support that on /2/files/download, but I can't promise if/when that would be implemented.
- amit-kumar7 years agoExplorer | Level 4
Thanks!
Our project is delayed bcoz of api issues.
We wants to download shared files, please tell us the api which is useful for this task, if not any kind of api exists then please fix these issues ASAP. - Greg-DB7 years ago
Dropbox Community Moderator
Thanks for the context. Right now, I unfortunately don't have a solution to offer for downloading these "received" files programmatically. This is open with the team, but I can't offer a timeline for when that may be possible. I'll follow up here once I have any update on this.
- amit-kumar7 years agoExplorer | Level 4
hello, Greg-DB any solution for downloading "received" files? and when that would be implemented?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,031 PostsLatest Activity: 2 days ago
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 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!