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: 

Not getting folder info in listfolder and listfolder/contunue apis

Not getting folder info in listfolder and listfolder/contunue apis

bharath_n_v
Explorer | Level 4
Go to solution

Hi,

 

Lets say there 2 users A and B.

User A home folder contains a folder by name folder1.

 

When we add User B on folder1 with Api https://www.dropbox.com/developers/documentation/http/documentation#sharing-add_folder_member we are getting success

 

But when we immediately try to list files for User B with api https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder and https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue, we are not getting folder1 in response. We had tried adding delay of 5s and tried. Whats happening is that, sometimes we are getting folder1 and sometimes we are not getting it at all.

 

Please anyone can help us why this behavior is happening? And if we have to add delay in calling apis then please help us with exact time so that we can get added folder for sure?

 

Thank you,

Bharath

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

When you add a new member to a folder, they then have access to that folder, but the folder may not yet be "mounted" in their account. If the folder is not yet mounted in their account, it will not be listed in their file/folder listing (e.g., as returned by /2/files/list_folder[/continue]).

 

Note that if the users A and B are on the same team, add user B to the shared folder may automatically mount the folder in their account. If they are not on the same team, the folder will not be automatically mounted. 

 

If the folder is not mounted in the new member's account, you can use /2/sharing/mount_folder to mount it, if you have access to the new member's account via the API.

 

In any case, there isn't any guarantee on how long things take to be mounted, but if you're waiting on changes, instead of using a delay, you should monitor the account for changes. For server-side apps, you can use webhooks. For client-side apps, you can use /2/files/list_folder/longpoll.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

When you add a new member to a folder, they then have access to that folder, but the folder may not yet be "mounted" in their account. If the folder is not yet mounted in their account, it will not be listed in their file/folder listing (e.g., as returned by /2/files/list_folder[/continue]).

 

Note that if the users A and B are on the same team, add user B to the shared folder may automatically mount the folder in their account. If they are not on the same team, the folder will not be automatically mounted. 

 

If the folder is not mounted in the new member's account, you can use /2/sharing/mount_folder to mount it, if you have access to the new member's account via the API.

 

In any case, there isn't any guarantee on how long things take to be mounted, but if you're waiting on changes, instead of using a delay, you should monitor the account for changes. For server-side apps, you can use webhooks. For client-side apps, you can use /2/files/list_folder/longpoll.

bharath_n_v
Explorer | Level 4
Go to solution

Thanks @Greg-DB  for the reply.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    bharath_n_v Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?