You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Jim_Hagerty
6 years agoNew member | Level 2
Dropbox API for Python: Can't Create Shared Link (CreateSharedLinkError, malformed path)
I'm having trouble getting a shareable link from a file through the Dropbox API. This is the entirety of my code: import os
import dropbox
dbx = dropbox.Dropbox('access token')
myPath = os.path.join...
Greg-DB
6 years agoDropbox Staff
When you make a Dropbox API call like this and supply a path, you should supply the path to the remote file on Dropbox, relative to the root of the Dropbox account.
In the code you shared here, you're instead sharing a path to the local file, which isn't a valid path for the Dropbox API.
That is, based on the sample you shared, the path value should instead look like:
"/DUNESBURY NEW ITEM PICS/2019/01 January/Originals/Flowers/DSC_0247.NEF"
(You can get these values from elsewhere on the API, such as in Metadata.path_lower, e.g,. as returned by files_list_folder.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 6 hours agoIf 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!