Creating an Intuit (QuickBooks) OAuth 2.0 app
This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.
Distilled from Intuit’s own documentation: Set up OAuth 2.0, Get the Client ID and Client Secret for your app, Set app redirect URIs, Learn about scopes, and Authorization discovery documents. Retrieved 2026-07-03.
QuickBooks Online exposes exactly one auth system for API access: OAuth 2.0 (authorization code grant). There is no API-key or Basic-auth mode.
- Sign in to the Intuit Developer dashboard and create an app. Select the QuickBooks Online Accounting scope (
com.intuit.quickbooks.accounting); addcom.intuit.quickbooks.paymentif the app also uses the Payments API, and the OpenID Connect scopes (openid profile email phone address) if you want Sign In With Intuit. - Add at least one redirect URI on the app’s Keys & OAuth tab (Development section for sandbox testing, Production section for live apps). It must exactly match the
redirect_uriyou send in the authorization request. - Copy the Client ID and Client secret from the app’s Keys & OAuth tab. The Development and Production sections have separate credentials.
- Redirect the user to the authorization endpoint
https://appcenter.intuit.com/connect/oauth2withclient_id,response_type=code,scope(space-separated),redirect_uri, and astatevalue. - On approval, Intuit redirects back to your
redirect_uriwithcode,state, and arealmIdquery parameter.realmIdis the QuickBooks company id and is required for every Accounting API call — persist it with the connection. (realmIdis delivered here on the redirect, not in the token response.) - Exchange the
codeat the token endpointhttps://oauth.platform.intuit.com/oauth2/v1/tokens/bearerwith aPOSTusinggrant_type=authorization_code,code, andredirect_uri, sent asapplication/x-www-form-urlencoded. Authenticate the client with an HTTP Basic header:Authorization: Basic+ base64(client_id:client_secret). - The token response is JSON:
access_token(valid 3,600 seconds),refresh_token,token_type(bearer),expires_in(3600),x_refresh_token_expires_in(8640000 = the rolling 100-day refresh window), andx_refresh_token_hard_expires_in. Store all of them plus therealmIdfrom step 5. - Call the Accounting API against
https://quickbooks.api.intuit.com/v3/company/{realmId}/...(sandbox:https://sandbox-quickbooks.api.intuit.com), passingAuthorization: Bearer {access_token}. - When the access token expires,
POSTto the same token endpoint withgrant_type=refresh_tokenand the latestrefresh_token(same Basic-auth header). Store therefresh_tokenreturned by every refresh — its value rotates (Intuit issues a new one roughly every 24 hours) and the previous value stops working once a new one is issued. - The refresh token has a rolling 100-day expiry. As long as you keep refreshing within 100 days it stays alive; if 100 days pass without use, the user must re-authorize from step 4.
- To disconnect,
POSTthe access or refresh token to the revoke endpointhttps://developer.api.intuit.com/v2/oauth2/tokens/revoke(again with the Basic-auth header); a200response confirms both tokens were revoked.
Connect it to Publicus
Section titled “Connect it to Publicus”Open Connections under Credentials, choose Intuit (QuickBooks), and pick Intuit OAuth 2.0. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.
See also: Intuit (QuickBooks) in the catalog.
This guide is maintained by Publicus and published under CC BY 4.0.