cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API integration

API integration

s00s
New member | Level 2

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?

1 Reply 1

Greg-DB
Dropbox 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).

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?