Accounting tokens refresh themselves

Every accounting API call loads credentials and proactively refreshes the access token before it expires, so the connection does not quietly go stale.

What it is

A single transport function that centralises tokens, refresh, error extraction and the pinned API version. A parallel GraphQL caller shares the same credential and refresh path for the newer Projects API.

Also called: QuickBooks disconnected again · token expired · have to reconnect every hour

See it
Accounting tokens refresh themselves
🔒ridgelinepostframe.com/project/quickb418
40×64 Shop
Framing · on schedule
A token lifecycle bar showing the refresh happening automatically before the expiry marker. Sample data — no customer information appears here.
How it works
  1. 1A call loads the account's credentials from a 60-second cache.
  2. 2If the access token is near expiry it is refreshed and the new pair persisted.
  3. 3The request is made against the environment's API host with the pinned minor version.
  4. 4Vendor fault envelopes are parsed into a readable message.
  5. 5The cache is invalidated whenever tokens change.
Why we built it

The centralisation is called out in the accounting boundary module: 'QBO was already the best-contained integration (qbApiCall/qbGraphqlCall centralize transport + tokens), so this pass establishes the MODULE BOUNDARY rather than re-shaping working logic.' Proactive refresh is documented on the function itself as loading credentials and refreshing 'when it's' near expiry.

The problem
  • An expired access token broke sync until someone reconnected manually.
  • Token handling scattered across call sites would drift.
Sound familiar?
What you get
The connection stays live without manual reconnection.
One place to change transport, tokens or API version.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →