Skip to content
Docs

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.

  1. Sign in to the Intuit Developer dashboard and create an app. Select the QuickBooks Online Accounting scope (com.intuit.quickbooks.accounting); add com.intuit.quickbooks.payment if the app also uses the Payments API, and the OpenID Connect scopes (openid profile email phone address) if you want Sign In With Intuit.
  2. 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_uri you send in the authorization request.
  3. Copy the Client ID and Client secret from the app’s Keys & OAuth tab. The Development and Production sections have separate credentials.
  4. Redirect the user to the authorization endpoint https://appcenter.intuit.com/connect/oauth2 with client_id, response_type=code, scope (space-separated), redirect_uri, and a state value.
  5. On approval, Intuit redirects back to your redirect_uri with code, state, and a realmId query parameter. realmId is the QuickBooks company id and is required for every Accounting API call — persist it with the connection. (realmId is delivered here on the redirect, not in the token response.)
  6. Exchange the code at the token endpoint https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer with a POST using grant_type=authorization_code, code, and redirect_uri, sent as application/x-www-form-urlencoded. Authenticate the client with an HTTP Basic header: Authorization: Basic + base64(client_id:client_secret).
  7. 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), and x_refresh_token_hard_expires_in. Store all of them plus the realmId from step 5.
  8. Call the Accounting API against https://quickbooks.api.intuit.com/v3/company/{realmId}/... (sandbox: https://sandbox-quickbooks.api.intuit.com), passing Authorization: Bearer {access_token}.
  9. When the access token expires, POST to the same token endpoint with grant_type=refresh_token and the latest refresh_token (same Basic-auth header). Store the refresh_token returned 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.
  10. 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.
  11. To disconnect, POST the access or refresh token to the revoke endpoint https://developer.api.intuit.com/v2/oauth2/tokens/revoke (again with the Basic-auth header); a 200 response confirms both tokens were revoked.

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.