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

ssergio's avatar
ssergio
New member | Level 2
8 months ago

Complex add shared links in account

Hello, please help me solve the problem.

I have 500+ shared links from another user.
I created my Dropbox account and created an application where I obtained KEY, SECRET, and TOKEN.

The shared links look like this:

https://www.dropbox.com/scl/fo/mp**********mwkrdxiko/h?rlkey=bu9j7zrcn**********p09lep&dl=0
https://www.dropbox.com/scl/fo/xffn**********7luxape/h?rlkey=bw5vgt01fyj0**********b4i&dl=0
https://www.dropbox.com/scl/fo/mo9xzivg**********032/h?rlkey=etvds95uk3o**********r1a7&dl=0
https://www.dropbox.com/scl/fo/21csj43p**********214/h?rlkey=huj6s4cdhhc71fw**********&dl=0
https://www.dropbox.com/scl/fo/hcrjwuj**********p3oh/h?rlkey=pt5f7tw0yr**********xl99n&dl=0

I need to add these folders to my account (in bulk).
Trying to get some information, I can only call the `get_shared_link_metadata` method, which returns an ID like this: id:mKIwYbAWl2A********Y0A

Unfortunately, with this ID, I can't do anything further. None of the methods accept it.

Going to each link and manually clicking the "Join folder" button is torture. There must be some way to automate this process, right?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    ssergio Ð—дравко is correct; the Dropbox API does not offer a way to save entire folders from shared links into an account, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

     

    For reference, for information on using the 'dl' and 'raw' URL parameters when directly accessing a shared link, refer to this help center article: https://help.dropbox.com/share/force-download

  • Hi ssergio,

    Your links are links to folders. Unfortunately, Dropbox provides endpoint to add only file as a single call (/2/files/save_url), not folder. You may try walk through the folder tree in a script and add all files one by one. Other solution may be download all folders locally in your Dropbox folder using something like here in a loop. One more solution may be mixture of the previous two. 😉 Whatever is most convenient for you.

    Hope this gives direction.