You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
PIttsburgh Menn
10 years agoNew member | Level 1
How to retrieve Shared Folder and Modifier information in /metadata call
I'm having issues with the shared_folder and modifier fields being returned in /metadata. I can't seem to get the API to return anything for shared_folder, and modifier always comes back as null.
The files in the folder I'm calling /metadata on have all been shared with another account. I've done this sharing using both /shares and through the UI, and I can visit the folders from a different account, so I know the files are shared.
I've made modifications from both accounts to the files. The rev has changed in response to these so I know that they took.
I've also shared the folder that the files are in as well (and the folder is not the root).
I'm setting the include_membership
parameter to true as well. I've tried with and without this param.
I'm kind of stumped as to what else I can try. Any ideas why I can't get these fields back from the API?
Thanks.
- Greg-DBDropbox Staff
Can you post a sample request/response so we can take a look? Or, feel free to open an API ticket if you'd prefer to send it privately.
- PIttsburgh MennNew member | Level 1
I've edited out any tokens / unique identifiers with dashes. Let me know if you need the hashes or revs and I can open a private ticket.
This is the request from Fiddler:
GET https://api.dropbox.com/1/metadata/auto/Test?include_deleted=False&include_membership=True HTTP/1.1 Authorization: Bearer --------------- Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml User-Agent: RestSharp/104.4.0.0 Host: api.dropbox.com Accept-Encoding: gzip, deflate Connection: Keep-Alive
Here is the response:
HTTP/1.1 200 OK Server: nginx Date: Wed, 22 Apr 2015 18:31:00 GMT Content-Type: application/json Connection: keep-alive x-content-type-options: nosniff set-cookie: gvc=-------------------; expires=Mon, 20 Apr 2020 18:31:00 GMT; httponly; Path=/; secure x-server-response-time: 87 x-dropbox-request-id: ---------------- pragma: no-cache cache-control: no-cache x-dropbox-http-protocol: None x-frame-options: SAMEORIGIN Content-Length: 690 { "read_only":false, "hash":"--------------------", "revision":1615, "bytes":0, "thumb_exists":false, "rev":"----------", "modified":"Tue, 14 Apr 2015 21:43:04 +0000", "size":"0 bytes", "path":"/Test", "is_dir":true, "modifier":null, "root":"dropbox", "contents":[ { "rev":"--------------", "thumb_exists":false, "path":"/Test/Training Relevant Courses.txt", "is_dir":false, "client_mtime":"Tue, 21 Apr 2015 23:21:29 +0000", "icon":"page_white_text", "read_only":false, "modifier":null, "bytes":2947, "modified":"Tue, 21 Apr 2015 23:21:29 +0000", "size":"2.9 KB", "root":"dropbox", "mime_type":"text/plain", "revision":1617 } ], "icon":"folder" }
Thanks for the help.
- Greg-DBDropbox Staff
It looks like the /Test folder isn't a shared folder (e.g., looking at the
icon
, which isfolder
, but would befolder_user
for shared folders). It sounds like you mean you only shared it via a shared link. These are actually two different kinds of sharing that Dropbox offers, andinclude_membership
only applies to the former.Specifically, "shared folders" refers to this feature:
https://www.dropbox.com/help/19
And "shared links" (which is what /shares returns) refers to this feature:
https://www.dropbox.com/help/167
If you've only shared the folder/files using shared links, they don't have any membership to report.
- PIttsburgh MennNew member | Level 1
Perfect! This was exactly my problem. Everything is returning correctly now. Is there any way to share folders like this through the API? I'm not seeing anything in either the Core API or the Business API.
- Greg-DBDropbox Staff
No, unfortunately the API doesn't currently offer any calls for managing shared folders, so you can't use it to programmatically share folders like that.
However, if you'd be interested in potentially participating in a shared folder API beta in the future, please sign up here:
https://dropboxapi.wufoo.com/forms/dropbox-shared-folder-api-beta-contact-info/
- PIttsburgh MennNew member | Level 1
Good to know. I've signed up for that beta. This is definitely a feature we'd want in our application. Thanks again.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days 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!