Skip to content

What connecting would end

GET
/auth/connect/grants
curl --request GET \
--url https://api.sloose.com/auth/connect/grants \
--header 'Authorization: Bearer <token>'

Whether a new grant would end one of this person’s other connections, asked before they connect (#1852). Zoho keeps 20 live grants per person per OAuth client, and minting one more silently revokes their OLDEST — so a person who has connected Sloose 20 times with one Zoho login ends a connection each time they connect again. Counted from the connections this person granted that still hold a credential, and the grants of theirs waiting on a choice of organisation, in every organisation, in one data centre: the connection’s own for a reconnect (connectorId, an organisation’s own connection in an organisation they administer), and for a new connection the one where they hold the most, since Zoho says which data centre only after the grant. A reconnect of the connection that is itself the oldest ends nothing else. When more than 20 look live, the oldest are counted as already ended — Sloose learns that only when it next refreshes them — and the one named is the oldest of the newest 20; and a connect that Zoho answers past the cap presumes the one it ended there and then, out of the count until a refresh that works says otherwise. Each grant is dated when Zoho issued it, a grant that waited on a choice of organisation included. The person’s, not an organisation’s: a CRM tab asks it before the organisation it sets up exists. Nothing is refused: ends names the connection Zoho would end, and connecting stays the person’s choice.

connectorId

The connection a reconnect renews.

string

The connection a reconnect renews.

What connecting would do to this person’s other connections.

Media typeapplication/json
object
cap
required

How many live grants Zoho keeps per person per client.

number
live
required

How many this person holds where the new grant would count.

number
ends
required

The connection Zoho would end by revoking its grant, or null when it would end none.

object
connectorId
required
string | null
label
required
string | null
orgId
required
string | null
orgName
required
string | null
region
required
string | null
waiting
required

A grant Zoho issued that still waits for the person to choose its organisation (/connect/choose): no connection holds it yet.

boolean
Examplegenerated
{
"cap": 1,
"live": 1,
"ends": {
"connectorId": "example",
"label": "example",
"orgId": "example",
"orgName": "example",
"region": "example",
"waiting": true
}
}

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

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"
}

An API token was used (code: SESSION_REQUIRED), or a staff member’s view of an organisation asked (STAFF_VIEW): the grants are the member’s across every organisation of theirs.

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"
}

No such connection, or it is not visible to this session.

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 restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com