We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Caligari
2 years agoExplorer | Level 3
API search access to shared folder
Hey there,
I'm working on a small utility using the dropbox API.
So far, I've been able to set up an App and used the files/search_v2 endpoint to locate specific files in the scoped app's folder.
But my actual use case is to find files in a folder for which the user will have a shared link. The folder is quite large, and I don't want the users to have to add it to their dropbox as a mounted share. Is it possible to pass a shared folder link to an endpoint like search_v2? Or is there another way that I can locate and read the files that I need from a shared folder link without mounting it?
Thanks for any advice you can provide.
The search endpoints don't support searching within a shared link, but you can use /2/files/list_folder[/continue] to list the contents (and filter client-side as needed) as you mentioned, so I suggest trying that to see if it would be sufficient for your use case.
To do so, you would specify the shared link URL in the 'shared_link.url' field. When doing so, the 'path' field would only be needed if you want to list a relative path for a specific subfolder inside the folder for which you're supplying the shared link.
I suggest trying the API v2 Explorer, as it's helpful for building calls like this.
- Scott-DBDropbox Staff
Hi Caligari,
It sounds like your app has "App folder" access. To access all files and folders a user has access to, including through the search endpoint, your app needs "Full Dropbox" access.
Scott
- CaligariExplorer | Level 3
(Wow is it hard to get the API Explorer to generate tokens for a different App, or did I miss something?)
Thanks for that! But...
So, I've created a new Full Access app. But I'm unsure what I'm supposed to put, where, to look for files in the shared folder I have a link for. How do I put that link (or part of it) in the optional Path field?
I note that the list_folder endpoint has a specific shared link field, but not the search endpoint. I suppose I could use the list_folder endpoint and process the list of filenames myself, but there are a lot of them, so I'd rather get just the ones I need, if that is possible.
Advice welcome!
- Caligari
- Greg-DBDropbox Staff
The search endpoints don't support searching within a shared link, but you can use /2/files/list_folder[/continue] to list the contents (and filter client-side as needed) as you mentioned, so I suggest trying that to see if it would be sufficient for your use case.
To do so, you would specify the shared link URL in the 'shared_link.url' field. When doing so, the 'path' field would only be needed if you want to list a relative path for a specific subfolder inside the folder for which you're supplying the shared link.
I suggest trying the API v2 Explorer, as it's helpful for building calls like this.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 6 days 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!