Zoho’s redirect target
const url = 'https://api.sloose.com/auth/zoho/callback';const options = {method: 'GET'};
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.sloose.com/auth/zoho/callbackZoho sends the browser here — the one redirect URI registered on the Zoho client. For a sign-in it hands the browser to Better Auth’s callback for the data centre that issued the code, which exchanges it, records the identity, and creates the session; the product’s sign-in hook then finds or creates the org and the member, refuses a revoked membership, and starts a new org’s trial. The browser lands on /auth/zoho/done.
For the offline grant (POST /auth/orgs/{org}/connect) this exchanges the code itself and stores the refresh token on the org’s connector, then answers with the popup page.
The first person to sign in to an org becomes its owner. After that, a member’s role comes from their CRM profile when the org follows Zoho roles, and is operator otherwise.
You never call this directly; Zoho does.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Zoho’s authorization code.
Zoho’s authorization code.
The OAuth state.
The OAuth state.
The data centre Zoho actually issued the code in. Honoured over the requested one.
The data centre Zoho actually issued the code in. Honoured over the requested one.
The accounts host that issued the code; the data centre when location is absent.
The accounts host that issued the code; the data centre when location is absent.
Set when the user declined or Zoho refused.
Set when the user declined or Zoho refused.
Responses
Section titled “Responses”A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.
A sign-in: on to Better Auth’s callback, then /auth/zoho/done.
A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.
A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.
A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.