Skip to content

Postman docs › Instance API › Connect session

Connect session ​

Connecting a QuickBooks Online company is a browser flow. The Odoo module asks QBO Connect for a single-use connect URL and opens it in the user's browser. QBO Connect then runs the Intuit sign-in, stores the tokens encrypted on its own side, and sends the browser back to Odoo. The Intuit tokens never reach Odoo.

Flow

  1. Odoo calls Start connect, or Start reconnect for an existing connection, and receives connect_url.
  2. Odoo opens connect_url in the user's browser within 10 minutes. QBO Connect sets a browser-binding cookie and redirects to Intuit.
  3. The user signs in with Intuit and chooses a company.
  4. Intuit sends the browser back to QBO Connect. QBO Connect checks the licence and the plan's company limit, exchanges the code for tokens, and stores them.
  5. QBO Connect redirects the browser to return_url with the result in the query string (see Browser return).
  6. Odoo confirms the result with Read a connection and result_code.

Business rules

  • return_url must be on the instance's registered origin (same scheme, host and port). It may carry a path and a query.
  • connect_url works once and expires 10 minutes after it is issued. An expired or used link shows an error page (410) in the browser.
  • The callback must arrive in the same browser that opened connect_url. Otherwise the result is browser_mismatch.
  • Connecting a company that this instance is already connected to updates that connection: same connection_id, new tokens. It does not create a second one.
  • The plan's company limit counts distinct companies with an active or reauth-required connection across all of the licence's instances. A company already counted can always be reconnected.

The connect session object ​

AttributeRequirementTypeDescription
connect_urlread onlysystem definedString (URL){APP_URL}/connect/<43 characters>. Open it in the user's browser. Single use.
expires_atread onlyString (ISO 8601, UTC)When connect_url stops working: 10 minutes after it was issued.

Sample object

json
{
  "connect_url": "https://qbo-connect.example.com/connect/Qm3xV8rT2kLp9sWz4nYc7hJd1fGb6aEu0iOq5tRy8Xw",
  "expires_at": "2026-12-01T10:10:00Z"
}

Start a connection ​

Creates a connect session for a new QuickBooks company.

Request body ​

AttributeRequirementTypeDescription
return_url* Requiredmax 1024 charactersString (URL)Where the browser goes after Intuit. Same scheme, host and port as the registered base URL; https unless the host is allowed for local development.
connection_idOptionalmax 40 charactersStringLeave it out for a new connection. See Start a reconnection.

Returns ​

201 Created with the connect session object. The Postman test prints connect_url in the Postman console.

Returns 201 Created

json
{
  "connect_url": "https://qbo-connect.example.com/connect/Qm3xV8rT2kLp9sWz4nYc7hJd1fGb6aEu0iOq5tRy8Xw",
  "expires_at": "2026-12-01T10:10:00Z"
}

Errors

HTTPerror.codeWhen
422validation_failedreturn_url is missing or not on the registered origin (details.fields.return_url).
403license_inactiveThe licence is not active. Renew it to connect QuickBooks.
401signature_missing, invalid_signature, timestamp_out_of_range, nonce_reusedSigning failed.
403instance_suspendedThe instance is suspended.
429rate_limitedToo many requests.
Request
Request URLPOST{{base_url}}/api/v1/connect/start
Content typeapplication/json
AuthenticationSigned
Rate limit120 per minute per instance
PostmanInstance API › Start connect

Request body

json
{
  "return_url": "{{odoo_base_url}}/qbo/return"
}

Start a reconnection ​

Creates a connect session to renew the tokens of an existing connection, for example after its status became reauth_required. The user must choose the same QuickBooks company. If they choose another, the result is company_mismatch, and the tokens Intuit issued for the other company are revoked.

Request body ​

AttributeRequirementTypeDescription
return_url* Requiredmax 1024 charactersString (URL)As in Start a connection.
connection_id* Required for reconnectmax 40 charactersStringThe conn_… id of a connection of this instance.

Returns ​

201 Created with the connect session object.

Returns 201 Created

json
{
  "connect_url": "https://qbo-connect.example.com/connect/Zp4kW9sQ1xRt7mNb3vLc8yHf2dGj5aEo6uIq0tKe7Mw",
  "expires_at": "2026-12-01T10:20:00Z"
}

Errors

As Start a connection, plus 404 not_found when connection_id is not a connection of this instance.

Request
Request URLPOST{{base_url}}/api/v1/connect/start
Content typeapplication/json
AuthenticationSigned
PostmanInstance API › Start reconnect

Request body

json
{
  "return_url": "{{odoo_base_url}}/qbo/return",
  "connection_id": "{{connection_id}}"
}

Browser return ​

After Intuit, QBO Connect redirects the browser to return_url and adds these query parameters.

Connected

ParameterValue
qbo_statusconnected
connection_idThe conn_… id of the new or renewed connection.
result_code40 random characters. Confirm it once, within 10 minutes, with Read a connection with a result code.
text
{{odoo_base_url}}/qbo/return?qbo_status=connected&connection_id=conn_01kbx7a2c9d4e6f8g0h1j3k5m7&result_code=…

Failed

ParameterValue
qbo_statuserror
errorOne of the codes below.
errorMeaningWhat Odoo shows
access_deniedThe user did not authorise the app at Intuit. Other Intuit errors (for example invalid_scope) are passed through in lower case.Try again.
expiredThe session expired before the user finished at Intuit.Start again.
browser_mismatchThe callback arrived in a different browser from the one that opened connect_url.Start again in one browser.
invalid_callbackIntuit's callback had no code or no valid company id.Start again.
license_inactiveThe licence stopped being active during the flow.Renew the licence.
plan_limit_reachedThe plan's QuickBooks company limit is reached. Nothing was exchanged with Intuit.Upgrade the plan or disconnect a company.
company_mismatchReconnect only: the user chose a different company.Reconnect and choose the same company.
token_exchange_failedIntuit did not issue tokens for the code.Try again later.

A link that is unknown, already used or forged shows an error page at QBO Connect instead of returning to Odoo.