Forum Discussion

alejandro_garcia's avatar
alejandro_garcia
New member | Level 2
4 years ago

files we get using the api in our websites?

Hi all
We need clients store files, so dev team can get the url of those images and consume them in our event sites
we make a bunch of requests to get that resource (for medium or large events)

 

These are our questions:
1.- can we the files with certain prefix using the api?

 

2.- can we use the url of those files we get using the api in our websites?
(like background images, icons, etc) in other words storing in dropbox and calling the images in our sites? something like:
<img id="session-image" src="some-dropbox-url/resources/clientid-eventid-pageid-2022.jpg">

 

3.- Will dropbox start to meter or cut off those requests?

 

4.- Is there a difference between individual and corporate accounts using the Dev API?

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    1.- can we the files with certain prefix using the api?

    I'm not sure I understand this question. I think you may have accidentally left out a word or two in this sentence. Can you clarify? Thanks.

     


    2.- can we use the url of those files we get using the api in our websites?
    (like background images, icons, etc) in other words storing in dropbox and calling the images in our sites? something like:
    <img id="session-image" src="some-dropbox-url/resources/clientid-eventid-pageid-2022.jpg">

    The Dropbox API offers the ability to get temporary links to files via the /2/files/get_temporary_link endpoint, but these are not meant for displaying content in the browser directly. I'll pass this along as a feature request for some sort of thumbnail link functionality, for instance, but I can't promise if or when that might be implemented though. That being the case, you'd probably want to download the content or a thumbnail to your server, via /2/files/download or /2/files/get_thumbnail_v2, respectively, and serve the data from there.

     


    3.- Will dropbox start to meter or cut off those requests?

    The Dropbox API does have a rate limiting system, but we don't have any specific numbers documented. Also note that not all 429s and 503s indicate explicit rate limiting, but in any case that you get a 429 or 503 the best practice is to retry the request, respecting the Retry-After header if given in the response, or using an exponential back-off, if not.

    There are also bandwidth limits on links. You can find more information on that here.

     


    4.- Is there a difference between individual and corporate accounts using the Dev API?

     

    Any kind of Dropbox account can use the Dropbox API file endpoints. Note that some Dropbox Business plans are subject to data transport limits on uploads though, as noted here.

  • alejandro_garcia's avatar
    alejandro_garcia
    New member | Level 2

    yes, sorry, this is the question 1

     

    1.- can we get files with certain prefix using the api?

    • Greg-DB's avatar
      Greg-DB
      Icon for Dropbox Staff rankDropbox Staff

      Thanks for clarifying! The Dropbox API doesn't offer the ability to search/list files with names containing a certain prefix in particular, but you could use the /2/files/list_folder[/continue] and/or /2/files/search_v2 endpoints to list or search for files, and filter the results client-side as desired.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,946 PostsLatest Activity: 4 hours ago
351 Following

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 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!