Coder Social home page Coder Social logo

skrilladeville / qboconceptstutorial-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intuitdeveloper/qboconceptstutorial-java

1.0 1.0 0.0 167 KB

Sample app in java demonstrating QBO concepts like invoicing, billing, inventory management

License: Apache License 2.0

Java 94.53% CSS 0.26% HTML 5.21%

qboconceptstutorial-java's Introduction

Sample Banner

QBO-Concepts-Tutorial-Java

The Intuit Developer team has written this starter app in Java using OAuth2.0 to provide working examples of OAuth 2.0 concepts, and how to integrate with Intuit endpoints.

Table of Contents

Requirements

In order to successfully run this sample app you need a few things:

  1. Java 1.8
  2. A developer.intuit.com account
  3. An app on developer.intuit.com and the associated client id and client secret.

First Use Instructions

  1. Clone the GitHub repo to your computer
  2. Fill in the application.properties file values (OAuth2AppClientId, OAuth2AppClientSecret) by copying over from the keys section for your app.

Running the code

Once the sample app code is on your computer, you can do the following steps to run the app:

  1. cd to the project directory
  2. Run the command:./gradlew bootRun (Mac OS) or gradlew.bat bootRun (Windows)
  3. Wait until the terminal output displays the "Started Application in xxx seconds" message.
  4. Your app should be up now in http://localhost:8080/
  5. The oauth2 callback endpoint in the sample app is http://localhost:8080/oauth2redirect
  6. To run the code on a different port, uncomment and update server.port property in application.properties. Also make sure to update the url in application.properties and in the Developer portal ("Keys" section).

Configuring the callback endpoint

You'll have to set a Redirect URI in the Developer Portal ("Keys" section). With this app, the typical value would be http://localhost:8080/oauth2redirect, unless you host this sample app in a different way (if you were testing HTTPS, for example).

Note: Using localhost and http will only work when developing, using the sandbox credentials. Once you use production credentials, you'll need to host your app over https.

Getting the OAuth Tokens

The sample app supports the following flows:

Connect To QuickBooks - this flow requests non-OpenID scopes. You will be able to make a QuickBooks API sample call (using the OAuth2 token) on the /connected landing page.

Get CompanyInfor API - This flow can be triggered from the connected page. It queries the QuickBooks CompanyInfo API and retrieves the response.

Scope

It is important to ensure that the scopes your are requesting match the scopes allowed on the Developer Portal. For this sample app to work by default, your app on Developer Portal must support Accounting scopes. If you'd like to support both Accounting and Payment, simply add thecom.intuit.quickbooks.payment scope in the application.properties file connectToQuickbooks method.

Storing the tokens

This app stores all the tokens and user information in the session. For production ready app, tokens should be encrypted and stored in a database.

qboconceptstutorial-java's People

Contributors

diana-derose avatar sunilsishtla avatar amazingzoe avatar maruthiintuit avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.