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.

Discuss Dropbox Developer & API

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

Re: API search access to shared folder

API search access to shared folder

Caligari
Explorer | Level 3
Go to solution

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.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

4 Replies 4

Scott-DB
Dropbox Staff
Go to solution

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

Caligari
Explorer | Level 3
Go to solution

(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-DB
Dropbox Staff
Go to solution

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.

Caligari
Explorer | Level 3
Go to solution

Thanks for that!

 

I'll filter the list locally, which should be fine. Just more network traffic 🙂

 

- Caligari

Need more support?