Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Omri1984
2 years agoExplorer | Level 4
Old dropbox and new dropbox API
Hi ,
i know that dropbox made a lot of changes in the last few years.
i want to understand something
there where a time that i needed to check the account , and check if the account is team in order to identify if it is a space team(new team) or the old one.
is this the case for today as well. or that dropbox deprecated all there old teams of the old dropbox and we move only to work with the new one?
i am using the api of dropbox and i used to support the old and the new dropbox themes.
can someone help me to understand 🙂
attaching the response from rootinfo
Omri1984 The combination of the two features allows an app to distinguish between all three team configurations. Please refer to this post for information on that. The recommendation is use these feature values to programmatically determine how to handle any particular team, as described throughout that post.
21 Replies
Replies have been turned off for this discussion
- Omri19842 years agoExplorer | Level 4
i think maybe it is related to this .
And if yes can you do me some clearance here 🙂 ?
And if no please what is the issue ?
- Greg-DB2 years ago
Dropbox Community Moderator
While Dropbox is working to migrate teams to the updated team space, there are still teams on each of the different configurations.
And yes, the best resources for information on this are:
- https://dropbox.tech/developers/api-updates-to-better-support-team-spaces
- https://developers.dropbox.com/dbx-team-files-guide
- Omri19842 years agoExplorer | Level 4
how can i request both of those featured values using the dropbox sdk with c# can share with an example of the code ?
- Greg-DB2 years ago
Dropbox Community Moderator
Omri1984 Здравко is correct; you can use those feature methods in the .NET SDK to make the feature calls for the team or user, but the team_shared_dropbox and distinct_member_home feature values for users and the has_distinct_member_homes feature values for teams haven't been implemented in .NET SDK yet.
You can determine the same information from the RootInfo object in your screenshot though:
- team_shared_dropbox: this is the same as checking if the RootInfo is a TeamRootInfo.
- distinct_member_home: this is the same as checking if rootNamespaceId
and homeNamespaceId are different.
- Omri19842 years agoExplorer | Level 4
Thank you Здравко and thank you Greg-DB i will give it a try.
In the past i implement changes that decided if it a new team or old by the root info.isteam
So now i have 3 options? New team old team and no team. And according to table i saw in article this is the way i need to decide if to use the team space client or the old client ?? - Greg-DB2 years ago
Dropbox Community Moderator
Omri1984 Yes, there are currently three possible team configurations. The linked resources cover how to detect all of the different feature states so apps can use the features accordingly. Note though that the 'Dropbox-API-Path-Root' header is supported by all three configurations, so you can use that to set the root when calling for any account regardless of the team configuration if you wish to do so. That can make your code a bit simpler.
- Omri19842 years agoExplorer | Level 4
ok i am working on requesting the get values from the api,
just one more thing how do i know when to call the team.getvalues or user.getvalues
for old and new team should i use the team and for personal user i need to use the user ?
- Omri19842 years agoExplorer | Level 4
also trying to fetch the get values and getting an error such as
creating client with https://api.dropboxapi.com and a Bearer token
var requestBody = "{\"features\":[{\".tag\":\"\"distinct_member_home\"},{\".tag\":\"team_shared_dropbox\"}]}";
var content = new StringContent(JsonConvert.SerializeObject(requestBody), Encoding.UTF8, "application/json");
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");var res = await httpClient.PostAsync("/2/users/features/get_values",content);
but always get the same response of:
Result: "Error in call to API function \"users/features/get_values\": request body: expected object, got string"
am i missing something here
- Здравко2 years agoLegendary | Level 20
Hi Omri1984,
Why are you doing your life difficult and trying to rediscover hot water? 😯😀 That, what you're trying to figure out is already done in the official Dropbox .NET SDK and you can use it ready for use! 🤷 Why you don't you make your life easier? 😉
Omri1984 wrote:...
var requestBody = "{\"features\":[{\".tag\":\"\"distinct_member_home\"},{\".tag\":\"team_shared_dropbox\"}]}";
var content = new StringContent(JsonConvert.SerializeObject(requestBody), Encoding.UTF8, "application/json");
...
Result: "Error in call to API function \"users/features/get_values\": request body: expected object, got string"
am i missing something here
🙂 Maybe "missing" is not the exact word. Do you understand what JSON object means? What do you have in your requestBody variable? 🤔 Is that an object or some string what you later serialize? 🧐
Actually you have done something twice, not missing! 😉 That what the error message signals for.
By the way you are setting you content type twice. The second one:
Omri1984 wrote:...
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");...
... may be skipped since already exists in previous code statement.
Hope this drive you in right direction.
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!