Creating a Custom OAuth App
Intuit uses the OAuth 2.0 authentication standard. From December 17th, 2019 Intuit no longer supports OAuth 1.0. OAuth requires the authenticating user to interact with QuickBooks Online using the browser. Follow the steps below to obtain the OAuth values.
Authenticate to QuickBooks Online in a Desktop Application
After setting the following connection properties, you are ready to connect:The driver is already registered as an OAuth application with QuickBooks Online and has embedded OAuth credentials.
- OAuthClientId: Leave this blank to use the embedded credentials, otherwise use the consumer key in your app settings.
- OAuthClientSecret: Leave this blank to use the embedded credentials, otherwise use the consumer secret in your app settings.
- CallbackURL: Leave this blank to use the embedded credentials, otherwise use the Launch URL in your app settings.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken
- Extracts the access token from the callback URL and authenticates requests.
- Refreshes the access token when it expires.
- Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Authenticate to QuickBooks Online in a Web Application
If you are connecting via a Web application, you will need to register your own OAuth app with QuickBooks Online.
To obtain the access token, set the following connection properties:
- CompanyId: The unique identifier of a given company in QuickBooks Online.
- OAuthClientId: The consumer key in your app settings.
- OAuthClientSecret: The consumer secret in your app settings.
- CallbackURL: The Launch URL in your app settings.
When connecting via a Web application, or if the driver is not authorized to open a browser window, you will need to exchange a verifier code for the OAuthAccessToken:
- Call GetOAuthAuthorizationURL. The stored procedure returns the URL to the OAuth endpoint.
-
Log in and authorize the application. You are redirected back to the callback URL.
The callback URL contains the verifier code in a query string parameter named "code". Extract the verifier code from the callback URL.
- Call GetOAuthAccessToken.
Set the following connection properties to connect to data:
- CompanyId
- OAuthClientId
- OAuthClientSecret
- OAuthAccessToken
Create a Custom OAuth app
Follow the steps below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:- Log into your Intuit developer account.
- From the Menu at the top, select Dashboard.
- In the Dashboard, create a new app by clicking the Create an App button, found under the Apps tab.
- Select the platform you want to develop for: QuickBooks Online and Payments.
- Give a name to your app and select the scopes for the APIs you would like to access.
- On the Keys & OAuth tab under Development, you will find the Client ID and Client Secret.
- Additionally, set the Redirect URI to a value, for instance: http://localhost:33333 and insert this value into the CallbackURL property.