Skip to content

Postman docs › Instance API › Access token (handoff)

Access token (handoff) ​

Access-token handoff gives the Odoo module a short-lived QuickBooks access token so it can call Intuit directly. It is disabled by default (ADR-019). Intuit's Developer Terms and its App Store security review restrict sharing tokens with other parties (see docs/compliance/INTUIT_COMPLIANCE.md). The supported integration is the QuickBooks API proxy.

Business rules

  • Handoff is off on this service, so every call returns 403 token_handoff_disabled. Turning it on is a reviewed change to the service that requires written confirmation from Intuit. Health reports it as capabilities.token_handoff.
  • Only the access token is handed out, never the refresh token.
  • The same checks as the proxy apply: active licence, active connection, current environment.
  • An access token close to expiry is refreshed before it is returned.

The access token object ​

AttributeRequirementTypeDescription
connection_idread onlyStringThe connection the token belongs to.
realm_idread onlyStringQuickBooks company id.
access_tokenread onlyStringBearer token for the QuickBooks Online Accounting API. Keep it in memory only.
token_typeread onlyStringbearer.
expires_atread onlyString (ISO 8601)When the token expires.
expires_inread onlyIntegerSeconds until expires_at.
api_base_urlread onlyString (URL)Intuit API base for the connection's environment.
minor_versionread onlyIntegerminorversion to send (75).
environmentread onlyStringsandbox or production.

Get an access token ​

Returns a usable access token for one connection. Cache it until about 60 seconds before expires_at. If QuickBooks answers 401, request a new token once; if that also fails, show Reconnect.

The Postman test accepts 200 (handoff enabled) and 403 (the default).

Request body ​

AttributeRequirementTypeDescription
connection_id* Requiredmax 40 charactersStringA conn_… id of the calling instance.

Returns ​

200 OK with the access token object, sent with Cache-Control: no-cache, no-store.

Returns 200 OK (only when handoff is enabled)

json
{
  "connection_id": "conn_01kbx7a2c9d4e6f8g0h1j3k5m7",
  "realm_id": "9341455012345678",
  "access_token": "eyJ…",
  "token_type": "bearer",
  "expires_at": "2026-12-01T11:03:12Z",
  "expires_in": 3412,
  "api_base_url": "https://sandbox-quickbooks.api.intuit.com",
  "minor_version": 75,
  "environment": "sandbox"
}

Returns 403 Forbidden (default)

json
{
  "error": {
    "code": "token_handoff_disabled",
    "message": "Access-token handoff is disabled. Use the QuickBooks API proxy (/api/v1/qbo/...)."
  }
}

Errors

HTTPerror.codeWhen
403token_handoff_disabledHandoff is off (the default).
422validation_failedconnection_id is missing or too long.
404not_foundThe connection does not belong to the calling instance.
403license_inactiveThe licence is not active.
409connection_reauth_requiredThe user must reconnect, or no tokens are stored.
409connection_disconnectedThe connection is disconnected.
409environment_mismatchThe connection belongs to the other QuickBooks environment.
503intuit_unavailableThe token had expired and Intuit could not be reached to refresh it.
Request
Request URLPOST{{base_url}}/api/v1/token
Content typeapplication/json
AuthenticationSigned
PostmanInstance API › Get access token

Request body

json
{
  "connection_id": "{{connection_id}}"
}