Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

dochdl's avatar
dochdl
Helpful | Level 6
8 years ago
Solved

How to get relative path of file in team folder?

My app tracks the files and keeps the metadata in my db and I do it by frequently calling list_folder/continue I recently added support to team folders I so I use path: "ns:<namespace_id>" to get t...
  • Greg-DB's avatar
    8 years ago

    To get the relative paths for items in the team space, you should use the "Dropbox-API-Path-Root" to set the root for the API call to that team space. You can find more information in the namespace guide:

     

    https://www.dropbox.com/developers/reference/namespace-guide

     

    For example, that would look like this:

     

     

    curl -X POST https://api.dropboxapi.com/2/files/list_folder \
        --header 'Authorization: Bearer <ACCESS_TOKEN>' \
        --header 'Dropbox-API-Select-User: <MEMBER_ID>' \
        --header 'Content-Type: application/json' \
        --header 'Dropbox-API-Path-Root: {".tag": "root", "root": "<NS_ID>"}' \
        --data "{\"path\": \"\"}"

    Also, using that, you can delete either via path or id.

     

About Dropbox API Support & Feedback

Node avatar for 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!