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: Struct

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

Variables:
  • users.Account.account_id – The user’s unique Dropbox ID.

  • users.Account.name – Details of a user’s name.

  • users.Account.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.

  • users.Account.email_verified – Whether the user has verified their email address.

  • users.Account.profile_photo_url – URL for the photo representing the user, if one is set.

  • users.Account.disabled – Whether the user has been disabled.

__init__(account_id=None, name=None, email=None, email_verified=None, disabled=None, profile_photo_url=None)
account_id
disabled
email
email_verified
name
profile_photo_url
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: 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)
is_teammate
team_member_id
class dropbox.users.FileLockingValue(tag, value=None)

Bases: 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: Account

Detailed information about the current user’s account.

Variables:
  • users.FullAccount.country – The user’s two-letter country code, if available. Country codes are based on ISO 3166-1.

  • users.FullAccount.locale – The language that the user specified. Locale tags will be IETF language tags.

  • users.FullAccount.referral_link – The user’s referral link.

  • users.FullAccount.team – If this account is a member of a team, information about that team.

  • users.FullAccount.team_member_id – This account’s unique team member id. This field will only be present if team is present.

  • users.FullAccount.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.

  • users.FullAccount.account_type – What type of account this user has.

  • users.FullAccount.root_info – The root info for this account.

__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)
account_type
country
is_paired
locale
root_info
team
team_member_id
class dropbox.users.FullTeam(id=None, name=None, sharing_policies=None, office_addin_policy=None)

Bases: Team

Detailed information about a team.

Variables:
  • users.FullTeam.sharing_policies – Team policies governing sharing.

  • users.FullTeam.office_addin_policy – Team policy governing the use of the Office Add-In.

__init__(id=None, name=None, sharing_policies=None, office_addin_policy=None)
office_addin_policy
sharing_policies
class dropbox.users.GetAccountArg(account_id=None)

Bases: Struct

Variables:

users.GetAccountArg.account_id – A user’s account identifier.

__init__(account_id=None)
account_id
class dropbox.users.GetAccountBatchArg(account_ids=None)

Bases: Struct

Variables:

users.GetAccountBatchArg.account_ids – List of user account identifiers. Should not contain any duplicate account IDs.

__init__(account_ids=None)
account_ids
class dropbox.users.GetAccountBatchError(tag, value=None)

Bases: 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: 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: Struct

Variables:

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

__init__(allocated=None)
allocated
class dropbox.users.Name(given_name=None, surname=None, familiar_name=None, display_name=None, abbreviated_name=None)

Bases: Struct

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

Variables:
  • users.Name.given_name – Also known as a first name.

  • users.Name.surname – Also known as a last name or family name.

  • users.Name.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.

  • users.Name.display_name – A name that can be used directly to represent the name of a user’s Dropbox account.

  • users.Name.abbreviated_name – An abbreviated form of the person’s name. Their initials in most locales.

__init__(given_name=None, surname=None, familiar_name=None, display_name=None, abbreviated_name=None)
abbreviated_name
display_name
familiar_name
given_name
surname
class dropbox.users.PaperAsFilesValue(tag, value=None)

Bases: 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: 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:
  • SpaceAllocation.individual (IndividualSpaceAllocation) – The user’s space allocation applies only to their individual account.

  • SpaceAllocation.team (TeamSpaceAllocation) – The user shares space with other members of their team.

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: Struct

Information about a user’s space usage and quota.

Variables:
  • users.SpaceUsage.used – The user’s total space usage (bytes).

  • users.SpaceUsage.allocation – The user’s space allocation.

__init__(used=None, allocation=None)
allocation
used
class dropbox.users.Team(id=None, name=None)

Bases: Struct

Information about a team.

Variables:
  • users.Team.id – The team’s unique ID.

  • users.Team.name – The name of the team.

__init__(id=None, name=None)
id
name
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: Struct

Variables:
  • users.TeamSpaceAllocation.used – The total space currently used by the user’s team (bytes).

  • users.TeamSpaceAllocation.allocated – The total space allocated to the user’s team (bytes).

  • users.TeamSpaceAllocation.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).

  • users.TeamSpaceAllocation.user_within_team_space_limit_type – The type of the space limit imposed on the team member (off, alert_only, stop_sync).

  • users.TeamSpaceAllocation.user_within_team_space_used_cached – An accurate cached calculation of a team member’s total space usage (bytes).

__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)
allocated
used
user_within_team_space_allocated
user_within_team_space_limit_type
user_within_team_space_used_cached
class dropbox.users.UserFeature(tag, value=None)

Bases: 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:
  • users.UserFeature.paper_as_files – This feature contains information about how the user’s Paper files are stored.

  • users.UserFeature.file_locking – This feature allows users to lock files in order to restrict other users from editing them.

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: 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: Struct

Variables:

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

__init__(features=None)
features
class dropbox.users.UserFeaturesGetValuesBatchError(tag, value=None)

Bases: 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: Struct

__init__(values=None)
values