Python OAuth2 and OpenID sample using Client
This sample app is meant to provide working example of how to Connect with QuickBooks using Python Client.
Please note that while these examples work, features called out above are not intended to be taken and used in production business applications. In other words, this is not a seed project to be taken cart blanche and deployed to your production environment.
For example, certain concerns are not addressed at all in our samples (e.g. security, privacy, scalability). In our sample apps, we strive to strike a balance between clarity, maintainability, and performance where we can. However, clarity is ultimately the most important quality in a sample app.
Therefore there are certain instances where we might forgo a more complicated implementation (e.g. caching a frequently used value, robust error handling, more generic domain model structure) in favor of code that is easier to read. In that light, we welcome any feedback that makes our samples apps easier to learn from.
Clone the repository:
git clone https://github.com/IntuitDeveloper/SampleOAuth2_UsingPythonClient.git
Note: This sample has been developed with Python 3.6
cd SampleOAuth2_UsingPythonClient/ pip install -r requirements.txt
- Enter your app's
Redirect URLand app
sandbox) in settings.py.
- Make sure the same
Redirect URLis entered in your Intuit developer app
Keystab under the right environment.
- To test Migration API, also enter
OAuth1 credentialsin the same file.
Launch your app:
python manage.py runserver
- OAuth flow followed by QBO API call
- OpenID flow followed by User Info API call
- Migration API to migrate tokens from OAuth1 to OAuth2
- Refresh and Revoke API for OAuth2/OpenID