Connect Estii accounts
Let your platform's users connect their Estii account over OAuth 2.1, and call the Estii API as them.
Your users click Connect Estii in your product, sign in to Estii, approve the access you asked for, and your platform receives tokens that call the Estii API as that user.
What to ask Estii for
Ask your Estii contact for an OAuth client, and send:
- your product name, as users should see it when they approve
- the exact redirect URI(s) your platform uses for OAuth callbacks, HTTPS only
- the scope you need:
readorread_write - your privacy policy URL and a support contact
You receive a client_id and a client_secret. The secret is shown once; store
it as you would any API secret. A test client and a live client are issued
separately.
Endpoints
Discovery document: https://api.estii.com/.well-known/oauth-authorization-server
| Purpose | URL |
|---|---|
| Authorization | https://api.estii.com/authorize |
| Token | https://api.estii.com/oauth/token |
| Revocation | https://api.estii.com/oauth/token |
| API base | https://api.estii.com/v1 |
Flow
- Send the user's browser to the authorization endpoint with
response_type=code, yourclient_id, your registeredredirect_uri, thescopeyou were issued, and a randomstate. PKCE (code_challengewithcode_challenge_method=S256) is recommended. - The user signs in to Estii and approves. Estii redirects to your
redirect_uriwithcode, yourstateunchanged, andiss=https://api.estii.com. If the user denies, the redirect carrieserror=access_deniedinstead. - Within ten minutes, exchange the code at the token endpoint, once: presenting a code a second time ends the connection it created. Send a
POSTwithContent-Type: application/x-www-form-urlencodedcarryinggrant_type=authorization_code,code,redirect_uri, your client credentials (client_idandclient_secretin the body, or HTTP Basic), andcode_verifierif you sent a challenge. - The response is JSON with
access_token,token_type,expires_in,scope,refresh_tokenandresource.
Call the API with Authorization: Bearer <access_token>. GET /v1/spaces
lists the spaces the user can reach and doubles as a connection test.
Tokens
- Access tokens last one hour.
- Refresh tokens last 30 days from their last use. Refresh with
grant_type=refresh_token,refresh_tokenand your client credentials. Each refresh returns a new refresh token; the old one stops working once the new one is used. - A refresh token that has expired or been revoked answers
400witherror: "invalid_grant". Send the user through Connect again. - A user can disconnect your platform from their Estii account settings. The
next API call answers
401. - To disconnect from your side,
POSTthe refresh token astokento the revocation endpoint with your client credentials.
Scopes
| Scope | Allows |
|---|---|
read | Reading the deals, library, pipeline and space data the user can see |
read_write | Everything read allows, plus creating and changing what the user can edit |
A write also needs the user's space to be on a paid plan or a trial: on a free
space it answers 402 with plan_required and an upgrade URL. Reads work on
every plan. A write with a read token answers 403 with
error="insufficient_scope" in the WWW-Authenticate header.
Rate limits and errors
Each connected user is limited as any credential is, with the same error
shapes (Authentication). A 401 on an API call
means the access token has expired or was revoked: refresh, then retry once.
Before you ship
- The redirect URI registered with Estii matches yours exactly, path and trailing slash included.
stateround-trips unchanged and you check it on return.- Token requests are form-encoded, not JSON.
invalid_granton refresh sends the user back through Connect, not into a retry loop.- Your disconnect revokes the refresh token.
- Tokens are never logged or shown to users.