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 email 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 email.

Return type:str
email_verified

Whether the user has verified their email address.

Return type:bool
name

Details of a user’s name.

Return type: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.FileLockingValue(tag, value=None)

Bases: dropbox.stone_base.Union

The value for UserFeature.file_locking.

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.FileLockingValue.enabled (bool) – When this value is True, the user can lock files in shared directories. When the value is False the user can unlock the files they have locked or request to unlock files locked by others.
classmethod enabled(val)

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

Parameters:val (bool) –
Return type:FileLockingValue
get_enabled()

When this value is True, the user can lock files in shared directories. When the value is False the user can unlock the files they have locked or request to unlock files locked by others.

Only call this if is_enabled() is true.

Return type:bool
is_enabled()

Check if the union tag is enabled.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = FileLockingValue('other', None)
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: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: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.PaperAsFilesValue(tag, value=None)

Bases: dropbox.stone_base.Union

The value for UserFeature.paper_as_files.

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.PaperAsFilesValue.enabled (bool) – When this value is true, the user’s Paper docs are accessible in Dropbox with the .paper extension and must be accessed via the /files endpoints. When this value is false, the user’s Paper docs are stored separate from Dropbox files and folders and should be accessed via the /paper endpoints.
classmethod enabled(val)

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

Parameters:val (bool) –
Return type:PaperAsFilesValue
get_enabled()

When this value is true, the user’s Paper docs are accessible in Dropbox with the .paper extension and must be accessed via the /files endpoints. When this value is false, the user’s Paper docs are stored separate from Dropbox files and folders and should be accessed via the /paper endpoints.

Only call this if is_enabled() is true.

Return type:bool
is_enabled()

Check if the union tag is enabled.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = PaperAsFilesValue('other', None)
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:IndividualSpaceAllocation
get_team()

The user shares space with other members of their team.

Only call this if is_team() is true.

Return type:TeamSpaceAllocation
classmethod individual(val)

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

Parameters:val (IndividualSpaceAllocation) –
Return type: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 (TeamSpaceAllocation) –
Return type: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: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, user_within_team_space_used_cached=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, user_within_team_space_used_cached=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
user_within_team_space_used_cached

An accurate cached calculation of a team member’s total space usage (bytes).

Return type:int
class dropbox.users.UserFeature(tag, value=None)

Bases: dropbox.stone_base.Union

A set of features that a Dropbox User account may have configured.

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:
file_locking = UserFeature('file_locking', None)
is_file_locking()

Check if the union tag is file_locking.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_paper_as_files()

Check if the union tag is paper_as_files.

Return type:bool
other = UserFeature('other', None)
paper_as_files = UserFeature('paper_as_files', None)
class dropbox.users.UserFeatureValue(tag, value=None)

Bases: dropbox.stone_base.Union

Values that correspond to entries in UserFeature.

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.

classmethod file_locking(val)

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

Parameters:val (FileLockingValue) –
Return type:UserFeatureValue
get_file_locking()

Only call this if is_file_locking() is true.

Return type:FileLockingValue
get_paper_as_files()

Only call this if is_paper_as_files() is true.

Return type:PaperAsFilesValue
is_file_locking()

Check if the union tag is file_locking.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_paper_as_files()

Check if the union tag is paper_as_files.

Return type:bool
other = UserFeatureValue('other', None)
classmethod paper_as_files(val)

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

Parameters:val (PaperAsFilesValue) –
Return type:UserFeatureValue
class dropbox.users.UserFeaturesGetValuesBatchArg(features=None)

Bases: dropbox.stone_base.Struct

Variables:users.UserFeaturesGetValuesBatchArg.features – A list of features in UserFeature. If the list is empty, this route will return UserFeaturesGetValuesBatchError.
__init__(features=None)

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

features

A list of features in UserFeature. If the list is empty, this route will return UserFeaturesGetValuesBatchError.

Return type:list of [UserFeature]
class dropbox.users.UserFeaturesGetValuesBatchError(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.UserFeaturesGetValuesBatchError.empty_features_list – At least one UserFeature must be included in the UserFeaturesGetValuesBatchArg.features list.
empty_features_list = UserFeaturesGetValuesBatchError('empty_features_list', None)
is_empty_features_list()

Check if the union tag is empty_features_list.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = UserFeaturesGetValuesBatchError('other', None)
class dropbox.users.UserFeaturesGetValuesBatchResult(values=None)

Bases: dropbox.stone_base.Struct

__init__(values=None)

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

values
Return type:list of [UserFeatureValue]