We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
HristoYordanov
2 years agoExplorer | Level 4
How to retrieve shared_folder_id of a folder, which inherited access of it's parent?
Hello ppl.
I have an issue retrieving shared_folder_id of a sub folders created via /2/files/create_folder_batch endpoint.
My structure:
RootFolder -> FlowFolder -> ProjectFolder -> SubFolder1 ; SubFolder2 ; SubFolder3
An access to FlowFolder is given to two teams - Team1 & Team 2
For each project I'm creating sub folder structure under FlowFolder via /2/files/create_folder_batch endpoint.
All sub folders are inheriting the access given to FlowFolder - Team1 & Team2.
What I want to achieve is to restrict the access of SubFolder3 only to Team1 (remove access of Team2) via /2/sharing/remove_folder_member endpoint.
Unfortunately I can not retrieve SubFolder3's shared_folder_id, but only it's parent_shared_folder_id (which refers to FlowFolder).
I've tried using the following endpoints as suggested by Greg-DB in other discussions:
- /2/sharing/get_folder_metadata ;
- /2/files/get_metadata ;
- /2/files/search_v2 (searching for SuBFolder3)
, but I can only receive parent_shared_folder_id (FlowFlolder).
In addition the /2/files/create_folder_batch endpoint does not have option to select if the freshly created folder are inheriting parent's access or not. Also I'm unable to unshare SubFolder3 and then share it to the proper team (Team1), because /2/sharing/unshare_folder also needs the "shared_folder_id" parameter.
Next thing I'm gonna try is using /2/sharing/set_access_inheritance -> "no_inherit" for FlowFolder before /2/files/create_folder_batch and then setting it back to "inherit", then setting proper teams access for each sub folder. But why so complicated? Hope you guys have better solution.
Please help π
HristoYordanov wrote:...
I have an issue retrieving shared_folder_id of a sub folders created via /2/files/create_folder_batch endpoint....
Unfortunately I can not retrieve SubFolder3's shared_folder_id, but only it's parent_shared_folder_id (which refers to FlowFolder).
...
, but I can only receive parent_shared_folder_id (FlowFlolder).
...
ΠΠ΄ΡΠ°ΡΠΈ Π₯ΡΠΈΡΡΠΎ,
ΠΠΌΠ°Ρ ΠΏΡΠΎΠ±Π»Π΅ΠΌ Ρ Π½Π°ΠΌΠΈΡΠ°Π½Π΅ΡΠΎ Π½Π° ΡΠ°ΠΊΡΠ² ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ ΠΏΡΠΎΡΡΠΎ Π·Π°ΡΠΎΡΠΎ ΡΠ°ΠΊΡΠ² Π½ΡΠΌΠ°. π ΠΡΠ°Π²ΠΈ ΡΠ°Π·Π»ΠΈΠΊΠ° ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ ΠΈ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ! Π‘Π°ΠΌΠΎ (ΠΏΡΡΠΊΠΎ) ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π°ΡΠ° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ ΠΈΠΌΠ° ΡΠ°ΠΊΡΠ² ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ. ΠΡΡΠΊΠ° Π΄ΡΡΠ³Π° ΠΈΠΌΠ° ΡΠ°ΠΌΠΎ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ (Π²ΠΊΠ»ΡΡΠΈΡΠ΅Π»Π½ΠΎ ΠΈ Π½Π°ΠΌΠΈΡΠ°ΡΠΈΡΠ΅ ΡΠ΅ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ΠΈ Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΠΈ Π²Π»ΠΎΠΆΠ΅Π½ΠΈ Π² ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° ΡΠ°ΠΊΠ°Π²Π°), Π±Π΅Π· ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎ Π½Π° ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ (ΠΏΡΠΎΡΡΠΎ Π·Π°ΡΠΎΡΠΎ Π½Π΅ Π΅ ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π°, ΠΏΠΎΠ½Π΅ Π½Π΅ ΠΏΡΡΠΊΠΎ). ΠΠ° ΡΠ΄ΠΎΠ±ΡΡΠ²ΠΎ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ΠΈΡΠ΅ Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΠΈ Π²Π»ΠΎΠΆΠ΅Π½ΠΈ Π² ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° ΠΈΠΌΠ°Ρ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡΠΈ ΡΠΎΡΠ΅ΡΠΈ Π½Π°ΠΉ-Π±Π»ΠΈΠ·ΠΊΠ°ΡΠ° ΠΎΠ±Ρ Π²Π°ΡΠ°ΡΠ° ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ, Π½ΠΎ Π½ΠΈΡΠΎ ΠΏΠΎΠ²Π΅ΡΠ΅!
ΠΠ°Π΄ΡΠ²Π°ΠΌ ΡΠ΅, ΡΠ΅ Π³ΠΎΡΠ½ΠΎΡΠΎ Π΄Π°Π²Π° Π½ΡΠΊΠ°ΠΊΠ²ΠΈ Π½Π°ΡΠΎΠΊΠΈ.
- ΠΠ΄ΡΠ°Π²ΠΊΠΎLegendary | Level 20
HristoYordanov wrote:...
I have an issue retrieving shared_folder_id of a sub folders created via /2/files/create_folder_batch endpoint....
Unfortunately I can not retrieve SubFolder3's shared_folder_id, but only it's parent_shared_folder_id (which refers to FlowFolder).
...
, but I can only receive parent_shared_folder_id (FlowFlolder).
...
ΠΠ΄ΡΠ°ΡΠΈ Π₯ΡΠΈΡΡΠΎ,
ΠΠΌΠ°Ρ ΠΏΡΠΎΠ±Π»Π΅ΠΌ Ρ Π½Π°ΠΌΠΈΡΠ°Π½Π΅ΡΠΎ Π½Π° ΡΠ°ΠΊΡΠ² ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ ΠΏΡΠΎΡΡΠΎ Π·Π°ΡΠΎΡΠΎ ΡΠ°ΠΊΡΠ² Π½ΡΠΌΠ°. π ΠΡΠ°Π²ΠΈ ΡΠ°Π·Π»ΠΈΠΊΠ° ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ ΠΈ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ! Π‘Π°ΠΌΠΎ (ΠΏΡΡΠΊΠΎ) ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π°ΡΠ° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ ΠΈΠΌΠ° ΡΠ°ΠΊΡΠ² ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ. ΠΡΡΠΊΠ° Π΄ΡΡΠ³Π° ΠΈΠΌΠ° ΡΠ°ΠΌΠΎ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ (Π²ΠΊΠ»ΡΡΠΈΡΠ΅Π»Π½ΠΎ ΠΈ Π½Π°ΠΌΠΈΡΠ°ΡΠΈΡΠ΅ ΡΠ΅ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ΠΈ Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΠΈ Π²Π»ΠΎΠΆΠ΅Π½ΠΈ Π² ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° ΡΠ°ΠΊΠ°Π²Π°), Π±Π΅Π· ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎ Π½Π° ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ (ΠΏΡΠΎΡΡΠΎ Π·Π°ΡΠΎΡΠΎ Π½Π΅ Π΅ ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π°, ΠΏΠΎΠ½Π΅ Π½Π΅ ΠΏΡΡΠΊΠΎ). ΠΠ° ΡΠ΄ΠΎΠ±ΡΡΠ²ΠΎ ΠΎΠ±ΠΈΠΊΠ½ΠΎΠ²Π΅Π½ΠΈΡΠ΅ Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΠΈ Π²Π»ΠΎΠΆΠ΅Π½ΠΈ Π² ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° ΠΈΠΌΠ°Ρ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡΠΈ ΡΠΎΡΠ΅ΡΠΈ Π½Π°ΠΉ-Π±Π»ΠΈΠ·ΠΊΠ°ΡΠ° ΠΎΠ±Ρ Π²Π°ΡΠ°ΡΠ° ΡΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡ, Π½ΠΎ Π½ΠΈΡΠΎ ΠΏΠΎΠ²Π΅ΡΠ΅!
ΠΠ°Π΄ΡΠ²Π°ΠΌ ΡΠ΅, ΡΠ΅ Π³ΠΎΡΠ½ΠΎΡΠΎ Π΄Π°Π²Π° Π½ΡΠΊΠ°ΠΊΠ²ΠΈ Π½Π°ΡΠΎΠΊΠΈ.
- Greg-DBDropbox Staff
HristoYordanov ΠΠ΄ΡΠ°Π²ΠΊΠΎ is correct. The new folders do not have a shared folder ID because they are not themselves shared folders. They instead just have a parent shared folder ID because they have a parent that is a shared folder. To manage the sharing of those folders in particular, they would need to be shared separately.
- HristoYordanovExplorer | Level 4
Thank you guys for your answers and time.
Seems that it will be the hard way π
It's a shame for Dropbox that simple action like that could be done under UI, but not using API.
Wish you all good.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,876 PostsLatest Activity: 6 hours 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!