Skip to content

Say which organisation a grant was for

POST
/auth/zoho/connect/choose
curl --request POST \
--url https://api.sloose.com/auth/zoho/connect/choose \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data nonce=example \
--data host=standard \
--data address=example

The form on the page the connect callback shows when nothing says which organisation the person picked on Zoho’s screen. nonce names the waiting grant — ten minutes, stored hashed — and the options route says which question it waits on.

ask: host — two of Zoho’s hosts answered for a new grant: host is the answer, one use.

ask: organisation — Zoho said no organisation, and its hosts answered for the person’s default one instead: address is the CRM’s address (or its organisation id), and each host is asked for that organisation by name. One answering completes the grant; two answering turns the question into ask: host on the same nonce; none sends the page back to /connect/choose with error (not_that_org, no_answer, address_unread, or — where Zoho turned the question away for its rate — day_spent when the CRM’s API credits for the last 24 hours are spent and too_many_calls when too many were being made at once), the grant still waiting for another try.

The grant then completes exactly as the callback would have: with the popup page inside a CRM tab, or back to the page it started on outside one. host: cancel sends it back to Zoho to revoke instead, and when Zoho does not confirm that, the answer says where the person removes Sloose themselves.

You never call this directly.

Media typeapplication/x-www-form-urlencoded
object
nonce
required
string
>= 1 characters <= 200 characters
host

Which host the person chose, or cancel: nothing is connected, the waiting grant is sent back to Zoho to revoke, and the page the connect began on is told so (#730) — and told where to remove Sloose by hand when Zoho did not confirm the revoke. Absent when address answers instead.

string
Allowed values: standard sandbox developer cancel
address

For a grant whose organisation Zoho did not say (ask: organisation from the options route): the CRM’s address as the person’s browser shows it — Zoho CRM’s, or a sandbox’s, carrying /org<id>/ — or the organisation id alone. Each of Zoho’s hosts is asked for that organisation by name: one answering connects it; two answering asks which host, on the same page; none sends the page back to try again, the grant still waiting until its ten minutes run out.

string | null
<= 2000 characters

A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.

Media typetext/html
string

Started outside a CRM tab: back to the page it began on, with ?connected=<id> or ?connect_error=<why>.

A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.

Media typetext/html
string

A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.

Media typetext/html
string

A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.

Media typetext/html
string

A small HTML page that posts the outcome to window.opener and closes itself. Not a JSON API.

Media typetext/html
string

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