Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
We are having trouble fetching a category of Dropbox paper docs via the API and would like to ask for help. In particular, we would like to use the Dropbox API to download/export paper docs and for the docs that are in our users' "Migrated Paper Docs" folders the API returns a LookupError("not_found") error. Does anyone see what we may be doing incorrectly or have advice on debugging further?
Additional context:
Properties of these docs:
* The docs allow anyone with a link to access them.
* The API key belongs to a user who can access these docs via the Dropbox website.
* The docs are in users' "Migrated Paper Docs" folder and (we expect) were created before Dropbox ran the internal version migration for our company (https://developers.dropbox.com/paper-migration-guide). We expect that before the migration these docs were not in folders.
* The docs have links into them from docs that are in team folders.
How we have tried to access the docs:
We are using the Python SDK and have tried the following APIs, but all return the above error:
* files_download_to_file
* files_export_to_file
* sharing_get_shared_link_file
* files_get_metadata
(We're aware the the API docs for /export note that that endpoint "only supports exporting files that cannot be downloaded directly and whose ExportResult.file_metadata has ExportInfo.export_as populated", which is why we've tried the three other APIs as well. API doc: https://www.dropbox.com/developers/documentation/http/documentation#files-export.)
Thank you!
Chris
Paper docs in the "Migrated Paper Docs" folder would be .paper files, which would need to be exported instead of downloaded, so files_export_to_file (or files_export) would be the right method to use.
A "not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified path
in the connected account under the relevant root. For example, this can happen if there's a mistake or typo in the path
value the app supplies, if the file/folder has been renamed, moved, or deleted from that path, if the app is not connected to the correct account for that particular path, etc.
When specifying the path, make sure you provide the full and accurate path for the desired file under the relevant root. For example, if you have a file named "example.paper" inside a folder named "Migrated Paper Docs", the path would be "/Migrated Paper Docs/example.paper"
. You can find more information on path formats here.
Here are several things you can check in particular to debug this:
path
value: You can use /2/files/list_folder and /2/files/list_folder/continue to list the contents of a folder so you can check what the correct path
values would be for items in those folder(s). To list the root, set path
to the empty string ""
when calling /2/files/list_folder. You can use the path_lower
or id
values returned for the files/folders in that folder to interact with those files/folders.
path
value you're using: You can use /2/users/get_current_account to check which account the app is connected to.
"/Apps/<app folder name>/folder/example.csv"
, you should only send the path
value as "/folder/example.csv"
.
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!