We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Filip J.1
9 years agoNew member | Level 1
Passing null into dropbox team client AsMember method .net sdk
When you pass null into the team dropbox client AsMember method does it just use the current user?
dropboxTeamClient.AsMember(null) <- what account gets used?
- Greg-DBDropbox Staff
There isn't a "current" user, so no user will be set. So, if you set null, it will just cause any user calls to fail.
- Filip J.1New member | Level 1
Let me correct my question, if you are using an admin account and pass in null as a memberId, an error will occur.
If you are using a personal account, and use the team dropbox client and pass in null as the memberId for AsMember, it will ignore the null and use the current personal dropbox account?
Is that correct Gregory?
- Greg-DBDropbox Staff
I don't know off hand what the behavior in that case would be, but if you're using a personal account, you shouldn't use a team client to begin with.
- Filip J.1New member | Level 1
Currently it seems the default behavior is to use the personal account information.
I was considering using just the team dropbox client and passing it a memberId that is either a value of a team member or null if I am using a personal account, that way I do not have to bother with switching between both team client and dropbox client.
If the dropbox team client can be used as a regular dropbox client if passed null, what are the drawbacks of just using this to reduce similar code for admins and personal accounts?
- Greg-DBDropbox Staff
I'm not sure there are any drawbacks, but that's not really the intended way of using it, so I wouldn't recommend doing so.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 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!