Skip to content
Desktop Accounting API

Quickstart

This guide takes you from a new account to a real API response from QuickBooks Desktop. Plan on about ten minutes, plus access to a Windows computer with QuickBooks Desktop installed. A trial installation with a sample company file works.

You will:

  1. Get a secret key.
  2. Install an SDK.
  3. Create an end user, which represents one of your customers.
  4. Connect that end user’s QuickBooks Desktop through the setup link.
  5. List the company file’s invoices.
  1. Sign up at /dashboard/sign-up and verify your email address. Your first visit creates an organization and a test project named Development. Test projects are free.

  2. Open API keys, enter a name such as local development and click Create secret key.

  3. Copy the key. It starts with sk_test_ and is shown only once. Store it as an environment variable on your server:

    Terminal window
    export DAAPI_SECRET_KEY="sk_test_..."
  4. On the same page, copy the Publishable key (pk_test_...). You need it in step 4 to create setup links.

Terminal window
npm install @desktopaccountingapi/quickbooks-desktop

Every SDK reads DAAPI_SECRET_KEY from the environment when you do not pass a key.

An end user is your customer. Each end user connects one QuickBooks Desktop company file. Set sourceId to your own ID for that customer so you can find the end user again later.

create-end-user.ts
import { DesktopAccountingApi } from "@desktopaccountingapi/quickbooks-desktop";
const client = new DesktopAccountingApi(); // reads DAAPI_SECRET_KEY
const endUser = await client.endUsers.create({
companyName: "Acme Supply",
sourceId: "cust_8812",
email: "ops@acme.example",
});
console.log(endUser.id); // eu_01j9...

Save the returned id (eu_...) next to your customer record. You can also create end users in the dashboard under End users.

Create an auth session. Its authFlowUrl is a setup link that walks the person at the QuickBooks computer through connecting the company file.

create-setup-link.ts
import { DesktopAccountingApi } from "@desktopaccountingapi/quickbooks-desktop";
const client = new DesktopAccountingApi();
const session = await client.authSessions.create({
publishableKey: "pk_test_...",
endUserId: "eu_01j9...",
linkExpiryMins: 60,
});
console.log(session.authFlowUrl);

The dashboard does the same thing: open the end user and click Create setup link.

Open the link on the Windows computer that runs QuickBooks Desktop. The flow takes about five minutes:

  1. Open the company file in QuickBooks, signed in as Admin, in single-user mode.
  2. Download the connector file (.qwc) and open it. The QuickBooks Web Connector starts and adds your application.
  3. In QuickBooks, allow access and choose Yes, always; allow access even if QuickBooks is not running.
  4. Paste the Web Connector password from the setup page into the Web Connector, then turn on Auto-Run.
  5. Wait on the last page while it checks the connection live. It finishes when the connection test passes.

Connect QuickBooks Desktop in the help center shows each screen in detail, and it is the page to send your customers.

Now call QuickBooks. QuickBooks Desktop operations need the end user’s ID, either per call or on a client scoped with forEndUser.

list-invoices.ts
import { DesktopAccountingApi } from "@desktopaccountingapi/quickbooks-desktop";
const client = new DesktopAccountingApi().forEndUser("eu_01j9...");
for await (const invoice of client.qbd.invoices.list({ limit: 10 })) {
console.log(invoice.refNumber, invoice.customer?.fullName, invoice.balanceRemaining);
}

The response is a list object, abridged here (real objects include every documented field, with null for empty values). Money is a decimal string such as "1250.00", so no amount is ever rounded by floating-point math:

{
"objectType": "list",
"url": "/v1/quickbooks-desktop/invoices",
"data": [
{
"id": "1A4F-1730312567",
"objectType": "qbd_invoice",
"refNumber": "1042",
"customer": { "id": "80000012-1730312001", "fullName": "Acme Supply" },
"transactionDate": "2026-09-30",
"subtotal": "1250.00",
"salesTaxTotal": "0.00",
"balanceRemaining": "1250.00",
"revisionNumber": "1730312567"
}
],
"nextCursor": "c1.eyJ...",
"hasMore": true,
"remainingCount": 37,
"cursorExpiresAt": "2026-10-05T16:04:11.120Z"
}

The TypeScript, Python, C# and Java loops above keep fetching pages until the list ends. Pagination explains cursors and their expiry.

Every response carries a Daapi-Request-Id header (req_...). Open Request log in the dashboard to see that request’s timeline: when it was queued, when the Web Connector picked it up, what QuickBooks returned and how long each step took.