Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Filip J.1's avatar
Filip J.1
New member | Level 1
10 years ago

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?

 

5 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    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.1's avatar
    Filip J.1
    New member | Level 1
    10 years ago

    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-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    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.1's avatar
    Filip J.1
    New member | Level 1
    10 years ago

    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-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    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

Node avatar for 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!