Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!
Forum Discussion
gcaspall
6 years agoExplorer | Level 3
VBA code to get Shared Folder link
Hi
Can somebody please tell me if it's possible to retrieve a shared folder link (that I will later send on to a 3rd party) using VBA and presumably the DropBox API? I know the exact path to the folder on my C drive that I would like to send a link to ("C:\Users\me\Dropbox\JobName\Folder2Link") so just want to retrieve the share link that I would normally get by right-clicking on the folder in question and selecting 'Copy Dropbox Link' from the menu.
If it is possible, I would very much appreciate some direction on how to accomplish this.
Thanks very much
- Greg-DB
Dropbox Staff
Yes, the Dropbox API does offer the ability to programmatically create shared links like this. That's available via the /2/sharing/create_shared_link_with_settings endpoint.
We recommend using one of the official Dropbox API v2 SDKs to access the API if possible.
For instance, in the Dropbox API v2 .NET SDK, this functionality is available as the CreateSharedLinkWithSettingsAsync method.
When using the API, file paths should be relative to the Dropbox root, so in your example the path would be "/JobName/Folder2Link".
- gcaspallExplorer | Level 3
Thanks very much Greg
If you could point me in the direction of where to download the API. and some samples of VBA code that I can relate to, I'd be most grateful.
Thanks very much
Graham
- Greg-DB
Dropbox Staff
I don't believe we have any samples or resources for VBA in particular unfortunately. If you can't use one of the official SDKs (or a third party library), you'll need to use the HTTPS API directly. You can find the documentation for the HTTPS endpoints here:
That includes curl examples that you can translate for whatever HTTPS client you're using.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,955 PostsLatest Activity: 36 minutes ago
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!