Learn how to make the most out of the Dropbox Community here 💙!

Forum Discussion

simonas's avatar
simonas
Explorer | Level 3
7 years ago
Solved

Mount a folder from a shared link

I have an app with full dropbox access.

1. I poll for changes and wait until some folder is shared with me (/list_folder/longpoll)

2. I get notified when some folder was shared with me (via /list_folder/longpoll)

3. I want to mount that shared folder. But not sure how to do it.

If I check list_folder with cursor, I dont get shared folder because it is not mounted yet and list_folder returns only mounted folders (?)

There is list_mountable_folders as well. But I dont have a valid cursor to get only "new" mountable folders.


What would be the flow to "fetch" only new mountable folders? :}

 

  • First, to clarify your post's title, it's not possible to mount a shared folder from a "shared link". There are a few different types of sharing on Dropbox, and they work differently.

    The term "shared links" refers to the ability to send a link to any file or folder. These cannot be "mounted".

    The term "shared folders" refers to the ability to share a folder with another Dropbox user, and allow them to view or edit the contents. These folders can be "mounted" in the recipient's account.

    Anyway, it sounds like you are referring to the latter functionality. 

    To mount a shared folder that you've been invited to, you should use the /2/sharing/mount_folder endpoint. That allows you to specify the shared folder ID of the currently-unmounted shared folder that you want to mount. 

    You can list the currently-unmounted folders and get the shared folder IDs for them from /2/sharing/list_mountable_folders[/continue]. (The 'path_lower' value will be absent for unmounted folders.) There isn't a way to monitor for new mountable entries only, but I'll pass this along as a feature request as well.

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

    First, to clarify your post's title, it's not possible to mount a shared folder from a "shared link". There are a few different types of sharing on Dropbox, and they work differently.

    The term "shared links" refers to the ability to send a link to any file or folder. These cannot be "mounted".

    The term "shared folders" refers to the ability to share a folder with another Dropbox user, and allow them to view or edit the contents. These folders can be "mounted" in the recipient's account.

    Anyway, it sounds like you are referring to the latter functionality. 

    To mount a shared folder that you've been invited to, you should use the /2/sharing/mount_folder endpoint. That allows you to specify the shared folder ID of the currently-unmounted shared folder that you want to mount. 

    You can list the currently-unmounted folders and get the shared folder IDs for them from /2/sharing/list_mountable_folders[/continue]. (The 'path_lower' value will be absent for unmounted folders.) There isn't a way to monitor for new mountable entries only, but I'll pass this along as a feature request as well.

    • simonas's avatar
      simonas
      Explorer | Level 3

      thanks for reply.

      Ability to monitor new mountable entries would be much appreciated :}

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,972 PostsLatest Activity: 5 hours ago
366 Following

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 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!