This is a sample Python application that demonstrates how to integrate with QuickBooks Project Management API using OAuth 2.0 authentication.
- OAuth 2.0 authentication with QuickBooks
- Project Management API integration
- Python 3.8 or higher
- QuickBooks Developer Account
- QuickBooks Online Account
- ngrok (for local development)
- Clone the repository:
git clone [email protected]:IntuitDeveloper/SampleApp-Projects-Python.git
- Install dependencies:
cd FlaskApp
pip install -r requirements.txt
-
Configure your QuickBooks app:
- Go to Intuit Developer Portal
- Create a new app or use an existing one
- Enable Project Management API scope
- Add your redirect URI (e.g.,
https://your-ngrok-url/callback
)
-
Update configuration:
- Open
FlaskApp/config.py
- Update the OAuth2 provider details with your app credentials:
OAUTH2_PROVIDERS = { 'quickbooks': { 'client_id': 'YOUR_CLIENT_ID', 'client_secret': 'YOUR_CLIENT_SECRET', 'redirect_uri': 'YOUR_REDIRECT_URI' } }
- Open
-
Start ngrok:
ngrok http 5001
- Run the application:
cd FlaskApp
python app.py
- Visit
http://localhost:5001
in your browser - Click "Connect to QuickBooks" to authenticate
- After successful authentication, you can:
- View customer list
- Create new projects associated with customers
Sample-app-projects-python/
├── FlaskApp/
│ ├── app.py # Main application file
│ ├── config.py # Configuration settings
│ ├── oauth_pythonclient/ # OAuth client implementation
│ ├── static/ # Static files (CSS, images)
│ └── templates/ # HTML templates
└── README.md
/
- Home page/qbo-login
- Initiates OAuth flow/callback
- OAuth callback handler/call-qbo
- Retrieves customer data/create-projects
- Creates new projects
The application includes error handling for:
- OAuth authentication failures
- API request failures
- Missing parameters
- Invalid scopes
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For support, please visit the Intuit Developer Community or create an issue in this repository.