Initialize OAuth
POST/api/qbo/integrations/initialize
Generates a QBO OAuth authorization URL. Works for both initial setup and reconnection.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Optional environment (sandbox | production) selects which QuickBooks environment to connect to. It is honoured only on non-production servers (production always connects to production) and defaults to sandbox when omitted. For a reconnect the existing connection's environment is reused. The environment is fixed once connected - to switch, disconnect and reconnect.
Requires the integrations.create permission.
Reconnecting with a different QuickBooks company (realm) than the one this integration already syncs is refused and nothing is overwritten: the callback redirects to the frontend callback with success=false, error=account_mismatch and errorMessage with "This QuickBooks Online integration is connected to the company "<current>", but you signed in to the company "<other>". The connection was not changed. …". To move to another company, remove the integration and add a new one. (for example, a new set of books).
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.