Disclaimer: QuickBooksUsers.com is an independent service operated by E-Tech Corporation and is not affiliated with, endorsed by, or sponsored by Intuit Inc. "QuickBooks" is a registered trademark of Intuit Inc., used for identification and reference purposes only. See our Terms of Service.

QuickBooks

Connecting QuickBooks Online Using the API

QuickBooksUsers.com TeamUpdated 2026-09-272 min read

Connecting QuickBooks Online to another system through the API takes three things: a developer app, an OAuth 2.0 token exchange, and JSON over HTTPS. A few details, mostly around tokens and rate limits, are where first attempts usually stumble. This page walks the setup in the order you will actually do it.

The QuickBooks Online API in brief

The API exposes REST endpoints that read and write live company data: customers, invoices, reports. Every request and response is JSON over HTTPS, and every request must carry an OAuth 2.0 access token. The full schema is documented on the Intuit developer portal, but the calls follow one predictable pattern; once you have queried customers, the other entities look familiar.

What do you need before you start?

Three one-time tasks on the Intuit Developer portal:

  1. Sign up for a free developer account.
  2. Create a new app and choose QuickBooks Online as its product.
  3. Copy the client ID and client secret the portal generates for that app.

The client ID and client secret identify your app during every OAuth exchange, so store the secret like a password. Everything after this point depends on those two strings.

How does OAuth 2.0 authentication work?

The flow runs once per user, then renews itself:

  1. Redirect your user to Intuit’s authorization URL, passing your client ID and the scopes you are requesting.
  2. The user approves access, and Intuit sends an authorization code back to your redirect URI.
  3. Exchange that code for an access token and a refresh token, and store both securely.
  4. Send the access token with every API call; when it expires, exchange the refresh token for a fresh one without involving the user again.

Access tokens expire after one hour, which is why the refresh token exists. Scopes decide what your calls may touch. Request the full set you will need at app creation, because a missing scope only surfaces as a permission error at call time.

How do you make your first API call?

Put the access token in the Authorization header as a Bearer token, then send a GET to the query endpoint. A customer list is the standard smoke test:

curl -H "Authorization: Bearer <access_token>" \
  "https://quickbooks.api.intuit.com/v3/company/<realmID>/query?query=select%20*%20from%20Customer"

The response is JSON, with the records nested inside QueryResponse:

{
  "QueryResponse": {
    "Customer": [
      { "Id": "58", "DisplayName": "Sample Customer" }
    ]
  }
}

Parse the Customer array in your application. The same request shape covers the other entities.

Which hurdles come up most often?

  • Expired tokens. Refresh before you call, not after a failure:

    if the access token is near one hour old:
        exchange the refresh token for a new access token
  • Permission errors. These usually mean a missing scope. Request the complete permission set when you create the app.

  • HTTP 429. You have hit a rate limit. Retry with exponential backoff rather than hammering the endpoint.

  • Sandbox versus production. The two environments use different URLs and different credentials. Test thoroughly in sandbox before you touch the live company.

Choosing between the API and a connector

A native connector wins when the mapping is standard and you want a working link this week. The API wins when you need custom logic, unusual data mapping, or control over exactly when data moves. If you need that logic but not the build itself, our QuickBooks custom programming and integrations service can take it on.

Create a sandbox app in the Intuit Developer portal, connect it to a sandbox company, and run the customer query above. One successful round trip proves your credentials, your scopes, and your token handling in a single pass.

Need Professional Help?

Contact Us