Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

eliotcole's avatar
eliotcole
Explorer | Level 4
6 years ago

Programmatically Process Shared Link Folders and Sub-Folders and Their Contents

Well I'm still at a loss.

 

I have the shared link to a folder that I need to check on a daily schedule to see if there's new files. The logic of which is all fine, but I just can't access anything below the initial shared link programatically.

 

Really all I need to get is the URL for any subfolder ... but I'll be damned if there's an API call that will supply that information.

 

  1. I have tried with the API token provided by the DB Dev Docs (auto).
  2. I have tried with my own token in place of that (to make the API call come from my account).
  3. I have tried all of the following and none can penetrate the barrier that is the second level of folders:
    1. get_shared_link_metadata
    2. get_folder_metadata
    3. list_received_files
    4. list_folder
    5. list_folders

 

I have access to the shared link, I have access to all the (3) subfolders.

 

One thing I note is that the URL changes once I enter the subfolder of the main shared link, and I'm unable to programattically

get that to just launch either a new get_shared_link_metadata on the new URL, or list_folder to get its contents. So if we had a primary shared link of:

https://www.dropbox.com/sh/aaa/bbb/

Let's say that has a subfolder called "john", I can't resolve that via the API because the URL to the john folder is not:

https://www.dropbox.com/sh/aaa/bbb/john

The link, instead, is:

https://www.dropbox.com/sh/aaa/ccc/john

 

A quick breakdown of how I would desire this to work:

Stage 1:

get_shared_link_metadata ---> list_folder

This works, and provides me with the contents of the shared folder, and the names and IDs of the subfolders.

Stage 2:

UNKNOWN ---> list_folder

This is the repeated stage (for each of the 3 subfolders), the UNKNOWN represents what I don't know, that should essentially be the equivalent of the get_shared_link_metadata ... except I don't have the right link for the subfolders, because they are changed each time.

16 Replies

Replies have been turned off for this discussion

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!