cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

How to download thumbnail/image file

How to download thumbnail/image file

Harsh S.1
New member | Level 1

Hi 

I am using the python requests library to request a particular thumbnail from my dropbox. My request receives a 200 response. However, how do i use this response object to actually display/save the thumbnail ? Any help will be greatly appreciated. 

4 Replies 4

Greg-DB
Dropbox Staff

When you receive a 200 status code from this endpoint, it indicates that the API call was successful, and the body will contain the thumbnail data. Exactly how you display that is up to your app though. For example, you might save that raw data to a local file, etc.

Harsh S.1
New member | Level 1

Hi Gregory. Thanks for your prompt reply.

Let me rephrase my question a little. What property/method can i call on the response object that would give me the data i need to either save it as an image file or make it appear as a picture on my site.

Harsh S.1
New member | Level 1

The dropbox api explorer returns a button with a link to download the thumbnail. How do i get that link or download source programmatically ?

Steve M.
Dropbox Staff

I think your question is just about how to use the requests library, so this probably isn't the best place to ask for help.

That said, here's a simple example of how to read the content from a URL using requests:

import requests
response = requests.get('http://www.example.com')
print(response.content)
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Steve M. Dropbox Staff
  • User avatar
    Harsh S.1 New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?