cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

shareFolderId with folder name

shareFolderId with folder name

parvezalam
Explorer | Level 3

someone shared a folder with me, to upload in that shared folder , the folder must be mounted.

 

I got the method to mount the shared folder but that required sharefolderId,  Till now what I found to get the sharedfolderId is to use ListMountableFoldersAsync method, but that will return all mountable folders

Can we get shareFolderId with folder name.

 

 

6 Replies 6

Здравко
Legendary | Level 20

@parvezalam wrote:

... Till now what I found to get the sharedfolderId is to use ListMountableFoldersAsync method, but that will return all mountable folders

Can we get shareFolderId with folder name.


Hi @parvezalam,

Within the same object where you have found "sharedfolderId" must be one more field named "name", if you want to sort/filter by name while using Dropbox API/SDK. 😉

Good luck.

Greg-DB
Dropbox Staff

That's correct, the ListMountableFoldersAsync method in the .NET SDK returns a ListFoldersResult with Entries being a list of SharedFolderMetadata. There's a SharedFolderMetadata.Name property that you can use to get the shared folder name.

parvezalam
Explorer | Level 3

May be I have not explained the issue properly.

 

After getting the list I can filter it with name, but question is...  I don't want to get entire list, I just want to pass the foldername as param instead of sharefolderId, so that I can fetch the sharefolderId from metadata, otherwise I have to run loop and filter with foldername then get the sharefolderId. 

 

Also is there anyway to check if the folder is already mounted.

 

Thanks

Здравко
Legendary | Level 20

Hi @parvezalam,

I understand what you are asking for, but there is no other way, as far as I know.


@parvezalam wrote:
...

Also is there anyway to check if the folder is already mounted.

...

If you take a look on documentation:


Unmounted shared folders can be identified by the absence of SharedFolderMetadata.path_lower.

I.e. a folder has been mounted when there is local path (local to the context account) within the metadata. 😉

Hope this helps.

parvezalam
Explorer | Level 3

Yes for checking the mounted or not I have checked PathLower Properties.

Greg-DB
Dropbox Staff

That's correct, you'll need to check the list and filter based on the desired name. Shared folder names are not unique identifiers, so it's possible for there to be more than one for any particular name. That being the case, it's not possible to look up a specific single shared folder just based on a name.

 

And yes, you should check for the path to see if it's mounted.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    parvezalam Explorer | Level 3
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?