Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
JohnAdam_CUNY
1 year agoHelpful | Level 6
Error updating Preferred Name ( New First and Last name )
We got a requirement to update our Dropbox first and last name. Is it simply to to use info to update an existing user Dropbox first name and last name. Our wrote the code using json API but not as f...
- 1 year ago
Documentation is not clear. See solution. Please advise if I misunderstood anything.
team_members_set_profile_v2(user, new_email=None, new_external_id=None, new_given_name=None, new_surname=None, new_persistent_id=None, new_is_directory_restricted=None)
if len(fname) != 0:
result = dbx_team.team_members_set_profile_v2(user=user, new_given_name=fname)
print(result)
if len(lname) != 0:
result = dbx_team.team_members_set_profile_v2(user=user, new_surname=lname)
print(result)
JohnAdam_CUNY
1 year agoHelpful | Level 6
Documentation is not clear. See solution. Please advise if I misunderstood anything.
team_members_set_profile_v2(user, new_email=None, new_external_id=None, new_given_name=None, new_surname=None, new_persistent_id=None, new_is_directory_restricted=None)
if len(fname) != 0:
result = dbx_team.team_members_set_profile_v2(user=user, new_given_name=fname)
print(result)
if len(lname) != 0:
result = dbx_team.team_members_set_profile_v2(user=user, new_surname=lname)
print(result)
Greg-DB
Dropbox Community Moderator
1 year agoIn your first attempt, I see you're putting other statements in place of the method's parameter names, which is not valid Python code, so you get that SyntaxError.
In your second attempt, I see you're supplying a list of UserSelectorArg, that is `[user]`, instead of just a single UserSelectorArg as documented, that is just `user`, so you get that ValidationError.
In your third attempt, I see you are using the correct parameter names and types, but note that you don't need to call it three times. It looks like you're not setting anything on that first call, so that one seems unnecessary. Edit: unless that first line is just copied from the documentation, and not something you're actually running?
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!