![]() PKCE should be only use onĬlient apps which doesn’t call your server. use_pkce ( bool) – Whether or not to use Sha256 based PKCE.Note: if this user has never linked the app, include_granted_scopes must be None.If left blank, will default to all scopes for app. scope ( list) – list of scopes to request in base oauth flow.See examples under example/oauth _init_ ( consumer_key, consumer_secret=None, locale=None, token_access_type=None, scope=None, include_granted_scopes=None, use_pkce=False, timeout=100, ca_certs=None ) ¶ OAuth 2 authorization helper for apps that can’t provide a redirect URI DropboxOAuth2FlowNoRedirect ( consumer_key, consumer_secret=None, locale=None, token_access_type=None, scope=None, include_granted_scopes=None, use_pkce=False, timeout=100, ca_certs=None ) ¶ This page will let the user “approve” yourĪpp, which gives your app permission to access the user’s Dropbox account. This exact value will be returned to you by finish(). Url_state ( str) – Any data that you would like to keep in the URL through theĪuthorization process. This CSRF token will be checked on finish() This function will also saveĪ CSRF token to session The redirect_uri you passed in to the constructor. When the user completes this process, they will be automatically redirected to You should redirect your user’s browser to this URL, which will give them an opportunity to grant your app access to their DropboxĪccount. This function builds an “authorization URL”. Starts the OAuth 2 authorization process. Unexpected error identifier and error message. ProviderException If Dropbox redirected to your redirect URI with some NotApprovedException If the user chose not to approve your app. Query_params ( dict) – The query parameters on the GET request to your redirect URI.īadRequestException If the redirect URL was missing parameters or if theīadStateException If there’s no CSRF token in the session.ĬsrfException If the state query parameter doesn’t contain the If left blank, default certificate location will be usedĬall this after the user has visited the authorize URL (see start()), approved yourĪpp and was redirected to your redirect URI. ca_cert ( str) – path to CA certificate.After the timeout the client will give up on connection. timeout ( Optional ) – Maximum duration in seconds that client will wait for any.Note: If this user has never linked the app, include_granted_scopes must be None. ![]() team - include team scopes in the grant.user - include user scopes in the grant.Which scopes to include from previous grants. scope ( list) – List of scopes to request in base oauth flow.offline - create one short-lived token with an expiration with a refresh token.online - create one short-lived token with an expiration.legacy - creates one long-lived token with no expiration.None - creates a token with the app default (either legacy or online).Some API calls return localized data and error messages this setting tells the server locale ( str) – The locale of the user of your application.consumer_secret ( str) – Your API app’s “app secret”.(For example: “dropbox-auth-csrf-token”). csrf_token_session_key ( str) – The key to use when storing the CSRF token in the session.session ( dict) – A dict-like object that represents the current user’s web session.With the Dropbox servers, though localhost URIs are allowed without pre-registration and This URI must be HTTPS-based and pre-registered redirect_uri ( str) – The URI that the Dropbox server will redirect the user to after the.consumer_key ( str) – Your API app’s “app key”.See examples under example/oauth _init_ ( consumer_key, redirect_uri, session, csrf_token_session_key, consumer_secret=None, locale=None, token_access_type=None, scope=None, include_granted_scopes=None, use_pkce=False, timeout=100, ca_certs=None ) ¶ The second involves getting an OAuth 2 access token from Dropbox. The first step is having the user authorize yourĪpp. OAuth 2 has a two-step authorization process. DropboxOAuth2Flow ( consumer_key, redirect_uri, session, csrf_token_session_key, consumer_secret=None, locale=None, token_access_type=None, scope=None, include_granted_scopes=None, use_pkce=False, timeout=100, ca_certs=None ) ¶īases: 2FlowBase The recommended action is to respond with an HTTP 403 error page. Thrown if the given ‘state’ parameter doesn’t contain the CSRF token from the user’s session. The recommended action is to redirect the user’s browser to try the approval process again. Thrown if all the parameters are correct, but there’s no CSRF token in the session. The recommended action is to show an HTTP 400 error page. Thrown if the redirect URL was missing parameters or if the given parameters were not valid. Dropbox.oauth – OAuth ¶ exception dropbox.oauth.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |