OAuth redirect target for Xero/QuickBooks Online consent screens (public; authenticated by the signed state parameter, not a session)
const url = 'https://api.invogi.com/v1/erp-connections/oauth/callback';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.invogi.com/v1/erp-connections/oauth/callback \ --header 'Authorization: Bearer <token>'Not called by API clients or apps/app directly — the provider’s own
consent screen redirects the browser here. No Clerk session exists on
this request; state (opaque, signed, short-lived) is the entire
trust boundary. On success, redirects the browser to apps/app’s
integrations page, or for a SCAN grant creates the scan (status
IMPORTING), runs it in the background, and redirects to its report
at /scans/{scanId}.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Absent when the user declined consent
Provider error such as access_denied
QuickBooks Online only — Intuit appends this alongside code/state; captures which QBO company (realm) was authorized
Responses
Section titled “Responses”Redirects to the apps/app integrations page (/scans/new for a SCAN grant), with erp_connected=<provider> on success or a stable erp_error code on failure; a successful SCAN grant redirects to /scans/{scanId}, or to the scan already running for that provider and company