Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
elsigh
5 years agoHelpful | Level 5
Sharing - how to share a folder with edit access when don't know my friend's dropbox user id?
I have an App built on the Dropbox API (https://songdocs.io).
I want to send a link to a folder to a friend, and I know I can get a shared link (which gives anyone with it view permissions) and...
- 5 years ago
The 'sharing_info' is only set on a folder if the folder is itself shared as a shared folder (or is inside a shared folder). Note that this is different than the kind of sharing offered by /2/sharing/create_shared_link_with_settings. Calling /2/sharing/create_shared_link_with_settings for a folder will not make it a "shared folder"; it only creates a "shared link" for it.
To first share the folder as a shared folder, so that it will receive 'sharing_info' with a 'shared_folder_id' that you can then use with /2/sharing/add_folder_member, you should first call /2/sharing/share_folder.
elsigh
5 years agoHelpful | Level 5
So I'm taking a stab at this.. My User #2 who has a shared link sends a request to sharingGetSharedLinkMetadata and gets back a folder object but the id in that response doesn't work as the shared_folder_id arg to sharingGetFolderMetadata.
When I get a files within that folder though each file object includes a parent_shared_folder_id that looks like the correct format for sharingGetFolderMetadata. Seems like I'm doing something wrong and I should be able to get the shared_folder_id somehow with 1 API call and the shared link url. I'm probably missing something obvious.. Thoughts?
Greg-DB
Dropbox Community Moderator
5 years agoThe 'id' for a file or folder, such as returned by sharingGetSharedLinkMetadata, is not the same thing as a 'shared_folder_id', and the two are not interchangeable.
In the flow we discussed, you would get the shared folder ID from user 1's side, anywhere you can get the metadata for the folder, such as from filesGetMetadata. You can then use that to get the 'preview_url' from sharingGetFolderMetadata as user 1. User 2 doesn't need the shared_folder_id in that flow. User 2 just receives the shared link, for viewing the file/folder, or the preview_url, for requesting access to the folder.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!