cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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:Ā 

API File upload to a member's shared folder

API File upload to a member's shared folder

schek
Explorer | Level 3
Go to solution

I am trying to upload a report file using API to business team member's shared folder.

What is the best way to do this?

Does using /2/files/upload endpoint requires, the shared folder I am uploading the file to, be shared to the account executing the API call?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Using the /2/files/upload endpoints (or /2/files/upload_session/* endpoints, for larger files) is the correct way to upload files.

When you do so, you'll specify the 'path' for where to upload the file. This would be the path in the connected account, based on the access token used for the API call. The path does not have to be inside a shared folder, but it can be. You can specify the path to be inside a shared folder, or not, depending on the use case, and/or user input, etc. 

Note that if the access token is for a particular, say, User A, but you want to upload the file to another user, say, User B, you would need to either:

  • upload the file to a shared folder in User A's account that User B is also a member of
  • get and use an access token for User B instead

Note that one exception is if you are using a "Dropbox Business API app" with the "team member file access" permission, in which case the access token enables access to the entire team and you have the ability to perform operations on any team member.

I recommend reviewing the Namespace Guide and Content Access Guide for more information.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

Using the /2/files/upload endpoints (or /2/files/upload_session/* endpoints, for larger files) is the correct way to upload files.

When you do so, you'll specify the 'path' for where to upload the file. This would be the path in the connected account, based on the access token used for the API call. The path does not have to be inside a shared folder, but it can be. You can specify the path to be inside a shared folder, or not, depending on the use case, and/or user input, etc. 

Note that if the access token is for a particular, say, User A, but you want to upload the file to another user, say, User B, you would need to either:

  • upload the file to a shared folder in User A's account that User B is also a member of
  • get and use an access token for User B instead

Note that one exception is if you are using a "Dropbox Business API app" with the "team member file access" permission, in which case the access token enables access to the entire team and you have the ability to perform operations on any team member.

I recommend reviewing the Namespace Guide and Content Access Guide for more information.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?