Discuss Dropbox Developer & API
I am using dbx.sharing_list_folders() function to get all the shared folder and using folder_metadata= dbx.sharing_get_folder_metadata(shared_folder.shared_folder_id) to get the meta data of the shared folder and from this object i am retreving folder path using folder_metadata.path_lower but it is giving None.
guide me to fetch folder path of the shared Folders
Hello @prabhat1999 ,
If your account has the updated team configuration and you are not using the Dropbox-API-Path-Root header with the Dropbox API, the team folders and any folders nested within them won’t return the path_lower field. Additionally, if your shared folder is unmounted, it won't return the path_lower field either. This could be the reason why your path_lower value is “None”.
That said, you could use the sharing_list_folders method directly to retrieve some of your path_lower values instead of looping the sharing_get_folder_metadata method with the shared_folder_id. Below I have provided an example code snippet while using the Dropbox-API-Path-Root header.
# Create a Dropbox instance with an access token and using the Dropbox-API-Path-Root header
dbx = dropbox.Dropbox('ACCESS_TOKEN')
root_namespace_id = dbx.users_get_current_account().root_info.root_namespace_id
dbx = dbx.with_path_root(dropbox.common.PathRoot.root(root_namespace_id))
# Call the sharing_list_folders method
result = dbx.sharing_list_folders()
# Print the list of shared folders path lower value
for entry in result.entries:
print(entry.path_lower)
Hi there!
If you need more help you can view your support options (expected response time for a 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!