Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
986 views
in Technique[技术] by (71.8m points)

oauth 2.0 - Extracting Parameters from Redirect URI - QuickBooks API / Python

I'm working on the authentication component of an app that calls the quickbooks online reporting API. Intuit has an authentication package, intuit-oauth, which I'm using to generate the authorization URL.

https://developer.intuit.com/app/developer/qbo/docs/develop/sdks-and-samples-collections/python/python_oauth_client

auth_client = AuthClient( client_id, client_secret, redirect_uri, 'production' )
url = auth_client.get_authorization_url([Scopes.ACCOUNTING])

This generates the url where the user can authorize the application. I also have a redirect URL - I'm using localhost for now, since I don't have a server running. Once the authorization is received from the user, the user is redirected to the redirect URL with a token contained in the URL that I need to retrieve.

I can navigate to the authorization URL, authorize the app, and then see the redirect URL in the browser, but how do I access that redirect URL after the authorization to extract the token? I'm using a Jupyter Notebook to test everything.

question from:https://stackoverflow.com/questions/65891679/extracting-parameters-from-redirect-uri-quickbooks-api-python

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...