Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
demo22
8 years agoExplorer | Level 3
Unable to use the add_file_member API (HTTP) with C#
I am trying to use this API but when inputting the parameters by creating anonymous properties, thanks to the "dot" in the ".tag" in "members", I cannot create that property as it will ask for an id...
demo22
8 years agoExplorer | Level 3
Thank you for your detail example, it looks more complicated than I expected but it can send the parameters correctly. However, the result I get is an error like this:
"error_summary": "access_error/invalid_id/.."
I read the doc and I know I got the wrong folder ID, which I got from the result of this API:
https://api.dropboxapi.com/2/files/list_folder
The example of the ID from the result is like this:
"id": "id:a4ayc_80_OEAAAAAAAAAXw"
So if this ID is wrong, then which ID should I get and how can I get it through the API?
Thank you so much for your help.
Greg-DB
Dropbox Community Moderator
8 years agoThat ID with "id:" is the file/folder ID, but the add_folder_member requires the "shared folder ID", which is an integer. You can get it from /2/files/list_folder[/continue] in FolderMetadata.sharing_info.shared_folder_id, or /2/sharing/list_folders[/continue] or /2/sharing/check_share_job_status in SharedFolderMetadata.shared_folder_id.
- demo228 years agoExplorer | Level 3
Thanks for the reply. As I read the document, I know that using this API "https://api.dropboxapi.com/2/files/list_folder" can get the "parent_shared_folder_id" inside the "sharing_info". Problem is, if the folder has not been shared before, the "parent_shared_folder_id" would not possibly appear in the result. The only way it would appear is after the folder has been shared once.
That makes the situation becomes very odd becasue in order to share a folder you need a so-called "parent_shared_folder_id". But the only way to get the "parent_shared_folder_id" you have to share the folder first. This is really confusing...
So how about you tell me the correct procedures in order to share a folder correctly using the APIs with reachable parameters? Thank you.
- Greg-DB8 years ago
Dropbox Community Moderator
You do not need a 'parent_shared_folder_id' in order to share a folder. You can share a non-shared folder using /2/sharing/share_folder by specifying the 'path' of the folder you want to share:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-share_folder
When you get the successful result from /2/sharing/check_share_job_status, it will contain the new shared folder ID:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-check_share_job_status
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!