What connecting would end
const url = 'https://api.sloose.com/auth/connect/grants';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.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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The connection a reconnect renews.
The connection a reconnect renews.
Responses
Section titled “Responses”What connecting would do to this person’s other connections.
object
How many live grants Zoho keeps per person per client.
How many this person holds where the new grant would count.
The connection Zoho would end by revoking its grant, or null when it would end none.
object
A grant Zoho issued that still waits for the person to choose its organisation (/connect/choose): no connection holds it yet.
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).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such connection, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).