dropbox.users – Users

This namespace contains endpoints and data types for user management.

class dropbox.users.Account(account_id=None, name=None, email=None, email_verified=None, disabled=None, profile_photo_url=None)

Bases: dropbox.stone_base.Struct

The amount of detail revealed about an account depends on the user being queried and the user making the query.

Variables:
__init__(account_id=None, name=None, email=None, email_verified=None, disabled=None, profile_photo_url=None)

x.__init__(…) initializes x; see help(type(x)) for signature

account_id

The user’s unique Dropbox ID.

Return type:str
disabled

Whether the user has been disabled.

Return type:bool
email

The user’s e-mail address. Do not rely on this without checking the email_verified field. Even then, it’s possible that the user has since lost access to their e-mail.

Return type:str
email_verified

Whether the user has verified their e-mail address.

Return type:bool
name

Details of a user’s name.

Return type:users.Name
profile_photo_url

URL for the photo representing the user, if one is set.

Return type:str
class dropbox.users.BasicAccount(account_id=None, name=None, email=None, email_verified=None, disabled=None, is_teammate=None, profile_photo_url=None, team_member_id=None)

Bases: dropbox.users.Account

Basic information about any account.

Variables:
  • users.BasicAccount.is_teammate – Whether this user is a teammate of the current user. If this account is the current user’s account, then this will be True.
  • users.BasicAccount.team_member_id – The user’s unique team member id. This field will only be present if the user is part of a team and is_teammate is True.
__init__(account_id=None, name=None, email=None, email_verified=None, disabled=None, is_teammate=None, profile_photo_url=None, team_member_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

is_teammate

Whether this user is a teammate of the current user. If this account is the current user’s account, then this will be True.

Return type:bool
team_member_id

The user’s unique team member id. This field will only be present if the user is part of a team and is_teammate is True.

Return type:str
class dropbox.users.FullAccount(account_id=None, name=None, email=None, email_verified=None, disabled=None, locale=None, referral_link=None, is_paired=None, account_type=None, root_info=None, profile_photo_url=None, country=None, team=None, team_member_id=None)

Bases: dropbox.users.Account

Detailed information about the current user’s account.

Variables:
__init__(account_id=None, name=None, email=None, email_verified=None, disabled=None, locale=None, referral_link=None, is_paired=None, account_type=None, root_info=None, profile_photo_url=None, country=None, team=None, team_member_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

account_type

What type of account this user has.

Return type:users_common.AccountType
country

The user’s two-letter country code, if available. Country codes are based on ISO 3166-1.

Return type:str
is_paired

Whether the user has a personal and work account. If the current account is personal, then team will always be None, but is_paired will indicate if a work account is linked.

Return type:bool
locale

The language that the user specified. Locale tags will be IETF language tags.

Return type:str

The user’s referral link.

Return type:str
root_info

The root info for this account.

Return type:common.RootInfo
team

If this account is a member of a team, information about that team.

Return type:users.FullTeam
team_member_id

This account’s unique team member id. This field will only be present if team is present.

Return type:str
class dropbox.users.FullTeam(id=None, name=None, sharing_policies=None, office_addin_policy=None)

Bases: dropbox.users.Team

Detailed information about a team.

Variables:
__init__(id=None, name=None, sharing_policies=None, office_addin_policy=None)

x.__init__(…) initializes x; see help(type(x)) for signature

office_addin_policy

Team policy governing the use of the Office Add-In.

Return type:team_policies.OfficeAddInPolicy
sharing_policies

Team policies governing sharing.

Return type:team_policies.TeamSharingPolicies
class dropbox.users.GetAccountArg(account_id=None)

Bases: dropbox.stone_base.Struct

Variables:users.GetAccountArg.account_id – A user’s account identifier.
__init__(account_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

account_id

A user’s account identifier.

Return type:str
class dropbox.users.GetAccountBatchArg(account_ids=None)

Bases: dropbox.stone_base.Struct

Variables:users.GetAccountBatchArg.account_ids – List of user account identifiers. Should not contain any duplicate account IDs.
__init__(account_ids=None)

x.__init__(…) initializes x; see help(type(x)) for signature

account_ids

List of user account identifiers. Should not contain any duplicate account IDs.

Return type:list of [str]
class dropbox.users.GetAccountBatchError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:users.GetAccountBatchError.no_account (str) – The value is an account ID specified in :field:`GetAccountBatchArg.account_ids` that does not exist.
get_no_account()

The value is an account ID specified in GetAccountBatchArg.account_ids that does not exist.

Only call this if is_no_account() is true.

Return type:str
is_no_account()

Check if the union tag is no_account.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
classmethod no_account(val)

Create an instance of this class set to the no_account tag with value val.

Parameters:val (str) –
Return type:users.GetAccountBatchError
other = GetAccountBatchError('other', None)
class dropbox.users.GetAccountError(tag, value=None)

Bases: dropbox.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:users.GetAccountError.no_account – The specified GetAccountArg.account_id does not exist.
is_no_account()

Check if the union tag is no_account.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
no_account = GetAccountError('no_account', None)
other = GetAccountError('other', None)
class dropbox.users.IndividualSpaceAllocation(allocated=None)

Bases: dropbox.stone_base.Struct

Variables:users.IndividualSpaceAllocation.allocated – The total space allocated to the user’s account (bytes).
__init__(allocated=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allocated

The total space allocated to the user’s account (bytes).

Return type:int
class dropbox.users.Name(given_name=None, surname=None, familiar_name=None, display_name=None, abbreviated_name=None)

Bases: dropbox.stone_base.Struct

Representations for a person’s name to assist with internationalization.

Variables:
__init__(given_name=None, surname=None, familiar_name=None, display_name=None, abbreviated_name=None)

x.__init__(…) initializes x; see help(type(x)) for signature

abbreviated_name

An abbreviated form of the person’s name. Their initials in most locales.

Return type:str
display_name

A name that can be used directly to represent the name of a user’s Dropbox account.

Return type:str
familiar_name

Locale-dependent name. In the US, a person’s familiar name is their given_name, but elsewhere, it could be any combination of a person’s given_name and surname.

Return type:str
given_name

Also known as a first name.

Return type:str
surname

Also known as a last name or family name.

Return type:str
class dropbox.users.SpaceAllocation(tag, value=None)

Bases: dropbox.stone_base.Union

Space is allocated differently based on the type of account.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_individual()

The user’s space allocation applies only to their individual account.

Only call this if is_individual() is true.

Return type:users.IndividualSpaceAllocation
get_team()

The user shares space with other members of their team.

Only call this if is_team() is true.

Return type:users.TeamSpaceAllocation
classmethod individual(val)

Create an instance of this class set to the individual tag with value val.

Parameters:val (users.IndividualSpaceAllocation) –
Return type:users.SpaceAllocation
is_individual()

Check if the union tag is individual.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_team()

Check if the union tag is team.

Return type:bool
other = SpaceAllocation('other', None)
classmethod team(val)

Create an instance of this class set to the team tag with value val.

Parameters:val (users.TeamSpaceAllocation) –
Return type:users.SpaceAllocation
class dropbox.users.SpaceUsage(used=None, allocation=None)

Bases: dropbox.stone_base.Struct

Information about a user’s space usage and quota.

Variables:
__init__(used=None, allocation=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allocation

The user’s space allocation.

Return type:users.SpaceAllocation
used

The user’s total space usage (bytes).

Return type:int
class dropbox.users.Team(id=None, name=None)

Bases: dropbox.stone_base.Struct

Information about a team.

Variables:
__init__(id=None, name=None)

x.__init__(…) initializes x; see help(type(x)) for signature

id

The team’s unique ID.

Return type:str
name

The name of the team.

Return type:str
class dropbox.users.TeamSpaceAllocation(used=None, allocated=None, user_within_team_space_allocated=None, user_within_team_space_limit_type=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(used=None, allocated=None, user_within_team_space_allocated=None, user_within_team_space_limit_type=None)

x.__init__(…) initializes x; see help(type(x)) for signature

allocated

The total space allocated to the user’s team (bytes).

Return type:int
used

The total space currently used by the user’s team (bytes).

Return type:int
user_within_team_space_allocated

The total space allocated to the user within its team allocated space (0 means that no restriction is imposed on the user’s quota within its team).

Return type:int
user_within_team_space_limit_type

The type of the space limit imposed on the team member (off, alert_only, stop_sync).

Return type:team_common.MemberSpaceLimitType