QuickBooks — Initiate OAuth

GET/external/v1/oauth/quickbooks/initiate/

Use this when you want LynxLedger to handle the QuickBooks OAuth flow (Option 1). Returns a QuickBooks authorization URL — redirect the user’s browser to it. The callback endpoint then creates the tenant and starts the import automatically.

ApiDocsParametersTitle

ApiDocsParamFieldApiDocsParamTypeApiDocsParamRequiredApiDocsParamDescription
user_idintegerApiDocsRequiredLynxLedger user id from Ensure User.
cash_flow_methodstringApiDocsRequireddirect or indirect.
redirect_urlstringApiDocsOptionalWhere to send the user after the callback completes. On success the user lands on {redirect_url}?status=success&domain_url=<prefix>.
ApiDocsRequestLabel
curl "https://backend.app.lynxledger.com/external/v1/oauth/quickbooks/initiate/?user_id=42&cash_flow_method=direct&redirect_url=https%3A%2F%2Fyourapp.com%2Fdone" \
  -H "X-API-Key: <encrypted_token>"
ApiDocsResponseLabel
{
  "status": "success",
  "status_code": 200,
  "data": {
    "authorization_url": "https://appcenter.intuit.com/connect/oauth2?client_id=...&response_type=code&scope=...&redirect_uri=...&state=..."
  }
}