Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Mhd
7 years agoExplorer | Level 4
Distinguish shared link and preview links
Am I correct to assume the following: a shared link will alawys have /s/ in the URL The original preview link is of the from : www.dropbox.com/home/path/to/file?preview=filename.pdf What I a...
Greg-DB
Dropbox Community Moderator
7 years agoDropbox shared links for files do currently have /s/, but there are other kinds of links. E.g., shared links for folders use /sh/.
In any case though, these link formats are not guaranteed and are subject to change in the future, so you shouldn't rely on them.
Likewise, you shouldn't rely on the "www.dropbox.com/home/path/to/file?preview" format.
You can list the files/folders in your account directly though, using list_folder and list_folder continue. That will return file metadata including path and id.
Using the paths you get from those, you can call the other methods as necessary, e.g., get_preview to get preview data, create_shared_link_with_settings to create shared links, list_shared_links to retrieve existing shared links, etc.
In any case though, these link formats are not guaranteed and are subject to change in the future, so you shouldn't rely on them.
Likewise, you shouldn't rely on the "www.dropbox.com/home/path/to/file?preview" format.
You can list the files/folders in your account directly though, using list_folder and list_folder continue. That will return file metadata including path and id.
Using the paths you get from those, you can call the other methods as necessary, e.g., get_preview to get preview data, create_shared_link_with_settings to create shared links, list_shared_links to retrieve existing shared links, etc.
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!