Learn how to make the most out of the Dropbox Community here 💙!
Forum Discussion
TheBadger
4 years agoExplorer | Level 3
Get folder links
Hello,
I've been tasked with creating shared folders for our team. Each team member will get their own folder that will contain files specific to them. I need a way to collect or create the shared...
Greg-DB
Dropbox Staff
4 years agoYes, you can use the Dropbox API to automate the creation of shared links. For Python, we recommend using the official Dropbox API v2 Python SDK:
https://github.com/dropbox/dropbox-sdk-python
With that, you can use the sharing_create_shared_link_with_settings method to create a shared link for any file or folder:
- TheBadger4 years agoExplorer | Level 3
Sorry I'm obviously not understanding the documentation because I keep getting an error.
The folder i want the link for is called test it's in the same directory as the python code.
the_link = dbx.sharing_create_shared_link_with_settings('/test', settings=None) print(the_link)
Traceback (most recent call last):
File "D:\james\Dropbox\Project KMG Instructors\dropbox test.py", line 13, in <module>
the_link = dbx.sharing_create_shared_link_with_settings('/test', settings=None)
File "C:\Users\james\AppData\Local\Programs\Python\Python39\lib\site-packages\dropbox\base.py", line 4060, in sharing_create_shared_link_with_settings
r = self.request(
File "C:\Users\james\AppData\Local\Programs\Python\Python39\lib\site-packages\dropbox\dropbox_client.py", line 346, in request
raise ApiError(res.request_id,
dropbox.exceptions.ApiError: ApiError('21aabc3f746b4a0ca5f079118eb3a353', CreateSharedLinkWithSettingsError('path', LookupError('not_found', None)))Sorry I'm new to all this.
- Greg-DB4 years ago
Dropbox Staff
The path, "/test" in your code here, should be referring to the path of the file or folder in the Dropbox account, not related to the location of the code you're running.
I recommend reading the File Access Guide for reference.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,972 PostsLatest Activity: 2 days 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!