You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Olaf B.2
8 years agoNew member | Level 2
Python: copy files between folders with different owners
Dear API support, Is it possible to copy files between folders with different owners? I need to adapt a functioning application for copying files under the same ownership. Thank you for the ...
Greg-DB
Dropbox Staff
If you mean you want to copy files between shared folders in a particular account where the shared folders have different owners, yes, you can copy them normally, as long as the account you're using has write permissions in the destination folder:
If instead you want to copy files across different accounts entirely, when you have both accounts linked to the app, you can use "copy references" to do so:
https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_copy_reference_get
https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_copy_reference_save
ArgusR
7 years agoExplorer | Level 4
Hello,
How can I link another account to my existing app?
And after that, how do I tell files_copy_reference_save that the path to save is for the other account?
Thanks,
- Greg-DB7 years agoDropbox Staff
ArgusR You should implement the OAuth app authorization flow in your app to allow arbitrary users to connect to it. You can find information on how this works in the OAuth guide:
https://www.dropbox.com/developers/reference/oauth-guide
There are OAuth 2 flow helpers in the Python SDK:
https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.oauth.DropboxOAuth2Flow
When using files_copy_reference_save in the Python SDK, you specify the path where you want to save the file or folder in the 'path' parameter:
- ArgusR7 years agoExplorer | Level 4
Thank you for your quick reply Greg.
I'm trying to understand the implementation, sorry but I'm new to this.
I only have the developer App inside dropbox, nothing else anywere. I created this app to get the token and use the python script dropbox-uploader (https://github.com/andreafabrizi/Dropbox-Uploader), so I don't have any web or mobile app.
I want to link two accounts to share some files without having to download and upload again.
There is a easy way to create this link request?
Thanks
- Greg-DB7 years agoDropbox Staff
It looks like the third party library you linked to doesn't implement copy references unfortunately, so you won't be able to use that for this without modifications.
You'll need to implement code for linking both users to the app (see the OAuth guide linked earlier) and then the code for getting the copy reference from one account and saving it on the other account (see the documentation for the methods for the Python SDK linked earlier).
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 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!