class DropboxOAuth2FlowNoRedirect(DropboxOAuth2FlowBase): (source)
OAuth 2 authorization helper for apps that can't provide a redirect URI (such as the command-line example apps). See examples under `example/oauth <https://github.com/dropbox/dropbox-sdk-python/tree/main/ example/oauth>`_
Method | __init__ |
Construct an instance. |
Method | finish |
If the user approves your app, they will be presented with an "authorization code". Have the user copy/paste that authorization code into your app and then call this method to get an access token. |
Method | start |
Starts the OAuth 2 authorization process. |
Inherited from DropboxOAuth2FlowBase
:
Method | build |
Build the path component for an API URL. |
Method | build |
Build an API URL. |
Instance Variable | code |
Undocumented |
Instance Variable | code |
Undocumented |
Instance Variable | consumer |
Undocumented |
Instance Variable | consumer |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | locale |
Undocumented |
Instance Variable | requests |
Undocumented |
Instance Variable | scope |
Undocumented |
Instance Variable | token |
Undocumented |
Method | _finish |
Undocumented |
Method | _get |
Undocumented |
Instance Variable | _timeout |
Undocumented |
Construct an instance. :param str consumer_key: Your API app's "app key". :param str consumer_secret: Your API app's "app secret". :param str locale: The locale of the user of your application. For example "en" or "en_US". Some API calls return localized data and error messages; this setting tells the server which locale to use. By default, the server uses "en_US". :param str token_access_type: the type of token to be requested. From the following enum: * None - creates a token with the app default (either legacy or online) * legacy - creates one long-lived token with no expiration * online - create one short-lived token with an expiration * offline - create one short-lived token with an expiration with a refresh token :param list scope: list of scopes to request in base oauth flow. If left blank, will default to all scopes for app. :param str include_granted_scopes: which scopes to include from previous grants. From the following enum: * user - include user scopes in the grant * team - include team scopes in the grant * *Note*: if this user has never linked the app, include_granted_scopes must be None :param bool use_pkce: Whether or not to use Sha256 based PKCE. PKCE should be only use on client apps which doesn't call your server. It is less secure than non-PKCE flow but can be used if you are unable to safely retrieve your app secret. :param Optional[float] timeout: Maximum duration in seconds that client will wait for any single packet from the server. After the timeout the client will give up on connection. If `None`, client will wait forever. Defaults to 100 seconds. :param str ca_cert: path to CA certificate. If left blank, default certificate location will be used
If the user approves your app, they will be presented with an "authorization code". Have the user copy/paste that authorization code into your app and then call this method to get an access token. :param str code: The authorization code shown to the user when they approved your app. :rtype: :class:`OAuth2FlowNoRedirectResult` :raises: The same exceptions as :meth:`DropboxOAuth2Flow.finish()`.