Skip to content

Begin Login with Zoho

GET
/auth/zoho/start
curl --request GET \
--url 'https://api.sloose.com/auth/zoho/start?dc=au&rediscover=1'

Open this in a popup. It redirects to Zoho’s consent screen; when the user finishes, /auth/zoho/done posts { type: "sloose:session", token, … } back to window.opener and closes.

Only the configured widget origin may receive a session — return is checked against it, and localhost is additionally allowed in development. Anything else is refused, because the return origin is where a session token would be delivered.

The session is a Better Auth session token: send it as Authorization: Bearer. It lasts eight hours from its last use and can be ended with POST /auth/ba/sign-out.

dc

Zoho data centre: us, eu, in, au, cn or jp. Defaults to us.

string
Example
au

Zoho data centre: us, eu, in, au, cn or jp. Defaults to us.

return

Where to post the session. Must be the widget origin.

string

Where to post the session. Must be the widget origin.

rediscover

Set to 1 to re-read the CRM’s modules and fields on the way back, even if a snapshot already exists. This is how “refresh from the CRM” works without an offline grant.

string
Example
1

Set to 1 to re-read the CRM’s modules and fields on the way back, even if a snapshot already exists. This is how “refresh from the CRM” works without an offline grant.

Redirect to Zoho’s consent screen.

dc is not a known Zoho data centre, or return is not the widget origin.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

ZOHO_CLIENT_ID is not configured on this deployment.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The sign-in could not be started.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}