We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
8ccarlile
5 years agoExplorer | Level 3
How do I retrieve a file's URL after searching for it using search API call
Hi all,
I'm needing to 1) search Dropbox for all files containing a string, and then 2) get the URLs for all of the files found.
I've set up a Dropbox API call which searches Dropbox for file...
- 5 years ago
8ccarlile wrote:... Is there any way to somehow extend the data presented in the API response? ...
Hi 8ccarlile,
Seems, my impression related to your final intent is wrong. The fastest way to get actual data of pointed file is using "2/files/download" API call. That's why I pointed this way. If for some reason you prefer web link, then you can get temporary one using "2/files/get_temporary_link" or create permanent using "2/sharing/create_shared_link_with_settings" API call. Already existing permanent link could be received using "2/sharing/list_shared_links" API call. Generally if you want to use file content within the application itself, better download it (one call less). If the content have to be forwarded to some other application, without granted access to the user account (client web browser, for example), then links are better. Temporary or permanent links - depends on what's your objectives. Permanent links let client optimise download speed (already cached content could be skipped) and fester work could be achieved. Temporary links are managed easily inside application and could be good compromise for incidental forwarding. Take in mind, permanent links when received are preview links! To get raw content link replace parameter "?dl=0" to "?raw=1". Once you have found what you're looking for using "2/files/search_v2" and "2/files/search/continue_v2", every metod, just described, gets usable. 😉
Hope this clarifies matter.
Здравко
5 years agoLegendary | Level 20
8ccarlile wrote:... Is there any way to somehow extend the data presented in the API response? ...
Hi 8ccarlile,
Seems, my impression related to your final intent is wrong. The fastest way to get actual data of pointed file is using "2/files/download" API call. That's why I pointed this way. If for some reason you prefer web link, then you can get temporary one using "2/files/get_temporary_link" or create permanent using "2/sharing/create_shared_link_with_settings" API call. Already existing permanent link could be received using "2/sharing/list_shared_links" API call. Generally if you want to use file content within the application itself, better download it (one call less). If the content have to be forwarded to some other application, without granted access to the user account (client web browser, for example), then links are better. Temporary or permanent links - depends on what's your objectives. Permanent links let client optimise download speed (already cached content could be skipped) and fester work could be achieved. Temporary links are managed easily inside application and could be good compromise for incidental forwarding. Take in mind, permanent links when received are preview links! To get raw content link replace parameter "?dl=0" to "?raw=1". Once you have found what you're looking for using "2/files/search_v2" and "2/files/search/continue_v2", every metod, just described, gets usable. 😉
Hope this clarifies matter.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!