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
s00s
6 months agoNew member | Level 2
API integration
I'm saving images into Dropbox using the API. What I'm looking for is a way to get the image preview URL, which is then used in HTML as the src value like:
html
<img src="{image url from dropbox}" />
The current URL that I have is always redirected to the Dropbox website and shows the image inside the Dropbox site. Are there any possible solutions?
- Greg-DBDropbox Staff
You can get Dropbox shared links using the API via /2/sharing/create_shared_link_with_settings and /2/sharing/list_shared_links (or corresponding native methods in the SDKs).
You can use the URL parameters documented in this help article to get different behaviors from Dropbox shared links, such as to return the file data instead of the web page.
In particular, in this case it sounds like you'd want to use raw=1 (instead of the default dl=0).
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,885 PostsLatest Activity: 8 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!