We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
gauravsc
7 years agoExplorer | Level 3
How to transfer files from one dropbox account to another dropbox account programmatically?
I am lookingfor a way to transfer files from one account to another dropbox account. I would like to achieve this programmatically (.Net/ Javascript). I tried to look up in forum/stack overflow and drop box docs, but unable to find any relative explanation. I want to do it on dropbox side, like if there is any api call or something available which lets me to copy files, rather than downloading from one account and uploading again on another. If something is there, please help. I am starting to develop and kind of new here on this platform.
It sounds like you're using two different apps; one for the source account, and one for the destination account. In order to use a copy reference between two accounts, they'll both need to be connected to the same app.
So, you should create an app on just one account, and then get an access token for that same app for each of the different accounts.
For the account that owns the app, you can do so easily by using the "Generate" button on the app's page on the App Console.
For the other account though, you'll need to use the OAuth app authorization flow:
https://www.dropbox.com/developers/reference/oauth-guide
https://www.dropbox.com/developers/documentation/http/documentation#authorization
- Greg-DBDropbox Staff
Yes, Dropbox offers the ability to programmtically copy files between accounts without downloading and re-uploading them via the use of "copy references". You can find the documentation for it at the following links:
https://www.dropbox.com/developers/documentation/http/documentation#files-copy_reference-get
https://www.dropbox.com/developers/documentation/http/documentation#files-copy_reference-save
Those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.
For example, in the .NET SDK:
And in the JavaScript SDK:
https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyReferenceGet__anchor
https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyReferenceSave__anchor
- gauravscExplorer | Level 3
Hi Greg
Thank you very much for your reply. I have checked the documentation and it is very helpful. Now i am trying to simulate copy-paste as specified in above docs in postman. I am getting copy reference but when i try to save using the copy_reference-save, i get no permission error. What i am doing is:
1. Create app in source account, from which i need to copy the file.2. Create access token from source account with full rights.
3. Repeat above steps for destination account.
4. Send post request to copy_reference-get with access token of source account. Here i get copy reference as response.
5. Send post request to copy_reference-save with access token of destination account. Here i get error as no_permission.
As i understand, my "destination account app" needs access of source account also. How can i connect "destination account app" to source account.
- Greg-DBDropbox Staff
It sounds like you're using two different apps; one for the source account, and one for the destination account. In order to use a copy reference between two accounts, they'll both need to be connected to the same app.
So, you should create an app on just one account, and then get an access token for that same app for each of the different accounts.
For the account that owns the app, you can do so easily by using the "Generate" button on the app's page on the App Console.
For the other account though, you'll need to use the OAuth app authorization flow:
https://www.dropbox.com/developers/reference/oauth-guide
https://www.dropbox.com/developers/documentation/http/documentation#authorization
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 5 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!