cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Uploading to team folders seemingly unsupported

Uploading to team folders seemingly unsupported

jared22
Explorer | Level 3

API : python

 

We have a paid business account. There are folders that are at the root of our business account that are shared with everyone on our team. We would like to be able to upload files, using the API, to these team folders. However, I can't figure out how to view this root business directory or upload a file to it.

 

To help clarify, this is an example of how our business directory looks:

Business Root 
-- Business Folder (the one we want to upload to) 
-- My Root (my root folder)

 

Whenever I try to do anything around listing the contents of my root or uploading a file, it makes my root directory "My Root" and not "Business Root". How can I upload to the "Business Folder"?

1 Accepted Solution

Accepted Solutions

Re: Uploading to team folders seemingly unsupported

Greg-DB
Dropboxer

It sounds like your team is using the "team space" configuration. You can upload to the team root via the API. To do so, you'll need to use the namespace IDs to specify which area you want to access. I recommend reading the Namespace Guide, which covers this in detail:

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

In the Python SDK in particular, to specify a particular root, you should use `with_path_root`. For example:

dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")

or:

dbx.with_path_root(dropbox.common.PathRoot.namespace_id("XXXXXXXXX")).files_list_folder("")

 

View solution in original post

2 Replies 2

Re: Uploading to team folders seemingly unsupported

Greg-DB
Dropboxer

It sounds like your team is using the "team space" configuration. You can upload to the team root via the API. To do so, you'll need to use the namespace IDs to specify which area you want to access. I recommend reading the Namespace Guide, which covers this in detail:

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

In the Python SDK in particular, to specify a particular root, you should use `with_path_root`. For example:

dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")

or:

dbx.with_path_root(dropbox.common.PathRoot.namespace_id("XXXXXXXXX")).files_list_folder("")

 

View solution in original post

Re: Uploading to team folders seemingly unsupported

jared22
Explorer | Level 3

That worked great.

 

I noticed that both 'dropbox.common.PathRoot' and 'with_path_root' are not mentioned in the python api documentation.  To help aid anyone in the future with this same problem, it would be very helpful to add this to the documentation. 

 

Thanks again for the help.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    jared22 Explorer | Level 3
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?