dropbox.auth – Auth

class dropbox.auth.AccessError(tag, value=None)

Bases: dropbox.stone_base.Union

Error occurred because the account doesn’t have permission to access the resource.

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_invalid_account_type()

Current account type cannot access the resource.

Only call this if is_invalid_account_type() is true.

Return type:auth.InvalidAccountTypeError
get_paper_access_denied()

Current account cannot access Paper.

Only call this if is_paper_access_denied() is true.

Return type:auth.PaperAccessError
classmethod invalid_account_type(val)

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

Parameters:val (auth.InvalidAccountTypeError) –
Return type:auth.AccessError
is_invalid_account_type()

Check if the union tag is invalid_account_type.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_paper_access_denied()

Check if the union tag is paper_access_denied.

Return type:bool
other = AccessError('other', None)
classmethod paper_access_denied(val)

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

Parameters:val (auth.PaperAccessError) –
Return type:auth.AccessError
class dropbox.auth.AuthError(tag, value=None)

Bases: dropbox.stone_base.Union

Errors occurred during authentication.

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:
expired_access_token = AuthError('expired_access_token', None)
invalid_access_token = AuthError('invalid_access_token', None)
invalid_select_admin = AuthError('invalid_select_admin', None)
invalid_select_user = AuthError('invalid_select_user', None)
is_expired_access_token()

Check if the union tag is expired_access_token.

Return type:bool
is_invalid_access_token()

Check if the union tag is invalid_access_token.

Return type:bool
is_invalid_select_admin()

Check if the union tag is invalid_select_admin.

Return type:bool
is_invalid_select_user()

Check if the union tag is invalid_select_user.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_user_suspended()

Check if the union tag is user_suspended.

Return type:bool
other = AuthError('other', None)
user_suspended = AuthError('user_suspended', None)
class dropbox.auth.InvalidAccountTypeError(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:
endpoint = InvalidAccountTypeError('endpoint', None)
feature = InvalidAccountTypeError('feature', None)
is_endpoint()

Check if the union tag is endpoint.

Return type:bool
is_feature()

Check if the union tag is feature.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = InvalidAccountTypeError('other', None)
class dropbox.auth.PaperAccessError(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:
is_not_paper_user()

Check if the union tag is not_paper_user.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_paper_disabled()

Check if the union tag is paper_disabled.

Return type:bool
not_paper_user = PaperAccessError('not_paper_user', None)
other = PaperAccessError('other', None)
paper_disabled = PaperAccessError('paper_disabled', None)
class dropbox.auth.RateLimitError(reason=None, retry_after=None)

Bases: dropbox.stone_base.Struct

Error occurred because the app is being rate limited.

Variables:
__init__(reason=None, retry_after=None)

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

reason

The reason why the app is being rate limited.

Return type:auth.RateLimitReason
retry_after

The number of seconds that the app should wait before making another request.

Return type:int
class dropbox.auth.RateLimitReason(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:
is_other()

Check if the union tag is other.

Return type:bool
is_too_many_requests()

Check if the union tag is too_many_requests.

Return type:bool
is_too_many_write_operations()

Check if the union tag is too_many_write_operations.

Return type:bool
other = RateLimitReason('other', None)
too_many_requests = RateLimitReason('too_many_requests', None)
too_many_write_operations = RateLimitReason('too_many_write_operations', None)
class dropbox.auth.TokenFromOAuth1Arg(oauth1_token=None, oauth1_token_secret=None)

Bases: dropbox.stone_base.Struct

Variables:
__init__(oauth1_token=None, oauth1_token_secret=None)

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

oauth1_token

The supplied OAuth 1.0 access token.

Return type:str
oauth1_token_secret

The token secret associated with the supplied access token.

Return type:str
class dropbox.auth.TokenFromOAuth1Error(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:
app_id_mismatch = TokenFromOAuth1Error('app_id_mismatch', None)
invalid_oauth1_token_info = TokenFromOAuth1Error('invalid_oauth1_token_info', None)
is_app_id_mismatch()

Check if the union tag is app_id_mismatch.

Return type:bool
is_invalid_oauth1_token_info()

Check if the union tag is invalid_oauth1_token_info.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = TokenFromOAuth1Error('other', None)
class dropbox.auth.TokenFromOAuth1Result(oauth2_token=None)

Bases: dropbox.stone_base.Struct

Variables:auth.TokenFromOAuth1Result.oauth2_token – The OAuth 2.0 token generated from the supplied OAuth 1.0 token.
__init__(oauth2_token=None)

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

oauth2_token

The OAuth 2.0 token generated from the supplied OAuth 1.0 token.

Return type:str