We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
solsupp
7 years agoExplorer | Level 3
Generate folder link manually
I wish to send uploaded folder links to potential folder members manually, via my own constructed email, is this possible. Also will I still have to add folder members using "AddFolderMemberAsync...
Greg-DB
Dropbox Community Moderator
7 years agoIf you want to share folders with other members programmatically but handle the communication yourself, you can do so. You will still need to call AddFolderMemberAsync; otherwise they won't have access to the folder.
To do so, you would want to:
- Share the folder initially using ShareFolderAsync (this only needs to be done once per folder).
- Get the resulting SharedFolderMetadata.PreviewUrl.
- Call AddFolderMemberAsync including each new member to invite. It defaults to not sending them an email from Dropbox.
- Send the SharedFolderMetadata.PreviewUrl to those members via your desired channel. Each invited member can then sign in to their account and go to that URL to add the folder to their account.
- solsupp7 years agoExplorer | Level 3
OK, thanks for that. I currently use
Dim updated As ShareFolderLaunch = Await dbx.Sharing.ShareFolderAsync(filepath, Nothing, True)
how can I get SharedFolderMetadata.PreviewUrl from SharedFolderLaunch, I am not sure of how to do this, and it wont cast as a previewURL.
- Greg-DB7 years ago
Dropbox Community Moderator
The ShareFolderAsync method returns a ShareFolderLaunch. Per the ShareFolderAsync documentation, if a ShareFolderLaunch.AsyncJobId is returned, you need to periodically call CheckShareJobStatusAsync to see when the job (i.e., sharing the folder) is done.
Once you get ShareFolderJobStatus.Complete from CheckShareJobStatusAsync, you can get the SharedFolderMetadata from ShareFolderJobStatus.Complete.Value.
Or, if the ShareFolderAsync method returns a ShareFolderLaunch.Complete directly, get the SharedFolderMetadata from ShareFolderLaunch.Complete.Value.
Either way, you can then get the URL from SharedFolderMetadata.PreviewUrl.
- solsupp7 years agoExplorer | Level 3
Thanks for your help, all working well now, one more question, what is the best method for deleting the folder>? if it exists.
About 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!