Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Using python dropbox.Dropbox (dbx instance), and after connecting using oauth2 generated token;
am unable to access, so far, the Backups tree. Using the relative-path from "rootdir", cant seem
to get to the Backups area (as part of the backups feature).
Python
dbx = dropbox.Dropbox(DROPBOX_ACCESS_TOKEN)
files = dbx.files_list_folder(path, recursive=True, include_media_info=True)
where when path is "/xxxx" and "xxxx" is a folder under "home", then the above works fine.
But, the Backups area (you know, the pc backup-with-sync feature) is an area I cant get to, so far.
Have tried path: "/backups/xxxx" ("xxxx is known top of backup tree) and variations.
So... via the Dropbox api, is it possible to access(read) the "Backups" tree(s).
To access content in your Dropbox, such as your backup data, you'll need to specify the path relative to the root. Do not add additional components not seen when browsing your Dropbox, such as "backups". The folder for backed up data is the name of the backup. For instance, if I have a backup named "Mac", containing a backed up "Desktop" folder, I would list that Desktop backup with the path "/Mac/Desktop".
You can also start with a path of the empty string "" to list the root itself.
@qpy Can you clarify what you mean when you say 'the “root” relative path has been dead end'? I tried it and it did work for me, e.g.:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"path":"/Mac","recursive":true}'
# {
# "entries": [
# {
# ".tag": "folder",
# "name": "Mac",
# "path_lower": "/mac",
# "path_display": "/Mac",
# "id": "id:Hcd4PILNenwAAAAAAAAB4w"
# },
# {
# ".tag": "folder",
# "name": "Desktop",
# "path_lower": "/mac/desktop",
# "path_display": "/Mac/Desktop",
# "id": "id:Hcd4PILNenwAAAAAAAAB5A"
# },
# {
# ".tag": "folder",
# "name": "test",
# "path_lower": "/mac/desktop/test",
# "path_display": "/Mac/Desktop/test",
# "id": "id:Hcd4PILNenwAAAAAAAAB9g"
# },
# {
# ".tag": "file",
# "name": ".localized",
# "path_lower": "/mac/desktop/.localized",
# "path_display": "/Mac/Desktop/.localized",
# "id": "id:Hcd4PILNenwAAAAAAAAB5w",
# "client_modified": "2022-11-24T15:50:01Z",
# "server_modified": "2022-11-24T15:52:31Z",
# "rev": "5ee39649961e204f84cfe",
# "size": 0,
# "is_downloadable": true,
# "content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
# },
# {
# ".tag": "file",
# "name": "test.txt",
# "path_lower": "/mac/desktop/test/test.txt",
# "path_display": "/Mac/Desktop/test/test.txt",
# "id": "id:Hcd4PILNenwAAAAAAAAB9w",
# "client_modified": "2022-11-24T15:44:23Z",
# "server_modified": "2022-11-24T15:52:37Z",
# "rev": "5ee3964eb20b004f84cfe",
# "size": 9,
# "is_downloadable": true,
# "content_hash": "019fb066085bea5236e22c837c748607c95a050d8c36410da1e7a5ca24f67e16"
# }
# ],
# "cursor": "AAGqg1NuBn6s4_wJjkxck2fGauGff7CMO_LBmSXDSVip2MiTblfHGHKO0VJJMhuKSO5J4zRgLQMAbOnl6d1SNukeivUqpxn06urom3LHaHnxlx93nAtMgHs2X76g_KZpfWyr74hYGT7j6JqIuxDWbbuFDLAPvqsWI06YA2F-oUR-EuhoaPI4jcEUa5lgmmmrc1CTNJviMx6iHG2tLe2o_rrf",
# "has_more": false
# }
curl -X POST https://content.dropboxapi.com/2/files/download \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Dropbox-API-Arg: {"path":"/mac/desktop/test/test.txt"}'
# something
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!