Skip to main content

Authentication

The Public API uses the OAuth2 client-credentials flow. There is no user login and no redirect: your system authenticates as itself using a client ID and secret issued by SignersChoice.

The flow​

Requesting a token​

client_id and client_secret are sent as a JSON body.

curl -X POST 'https://publicapi.signerschoice.com/v1/auth/token' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}'

A successful response:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "Files.List Files.Retrieve Users.Search"
}
FieldMeaning
access_tokenThe JWT to send on subsequent requests
token_typeAlways Bearer
expires_inLifetime in seconds from issue — currently 3600 (60 minutes)
scopeSpace-separated scopes actually granted. May be narrower than you expect — check it
Read the returned scope

scope reflects what your client was provisioned with, not what you asked for. If an endpoint later returns 403, compare its required scope against this value before raising a support request.

Using the token​

Send it in the Authorization header on every request to a resource endpoint, together with the X-Sender-Id header:

curl 'https://publicapi.signerschoice.com/v1/files' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
-H 'X-Sender-Id: 7d3c1a52-9e4b-4f0a-b2d6-1c8e5f7a9b30'

The token also carries your organization_id. Endpoints read the organization from that claim, which is why no request takes an organization parameter.

The sender​

X-Sender-Id is the ID of the SignersChoice user the request is made on behalf of — find it with GET /v1/users. It must be an active user of the organization in your token. The API records the request against that user (for example as the creator of a file) and applies that user's permissions, exactly as in the SignersChoice web portal. A missing or invalid sender is rejected with 403 SENDER_INVALID.

Only the token and health endpoints do not need it.

Token lifetime and renewal​

Tokens are valid for 60 minutes. There is no refresh token — when one expires, request another using the same credentials.

Two approaches work well:

  • Cache and reuse. Keep the token in memory and request a new one shortly before expires_in elapses. Refreshing at around 80% of the lifetime (roughly 48 minutes) avoids races with clock skew.
  • Retry on 401. Request a new token and replay the failed call once. Keep this to a single retry so an genuinely invalid credential cannot cause a request storm.

Requesting a token on every call also works but is wasteful, and repeated failures count toward lockout.

Lockout​

Repeated authentication failures lock the client out temporarily.

SettingValue
Failed attempts before lockout5
Lockout duration15 minutes

While locked out, POST /v1/auth/token returns 429 Too Many Requests with the error code CLIENT_LOCKED_OUT:

{
"success": false,
"error": {
"status": 429,
"code": "CLIENT_LOCKED_OUT",
"message": "Client is temporarily locked out due to too many failed attempts",
"timestamp": "2026-11-16T09:00:00Z"
}
}
Do not retry a 429 immediately

Retrying during lockout does not extend it, but it will not succeed either. Wait out the window. If you see 429 in production, the usual cause is a stale secret after a rotation — fix the credential rather than adding retries.

Revoking access​

There is no token revocation endpoint: a token stays valid until it expires. If a secret is compromised, contact support to have the credential rotated.

Keeping credentials safe​

  • Store the secret in a secret manager, not in source control or a config file.
  • Use separate credentials per environment so a non-production leak cannot touch production data.
  • Rotate on a schedule, and immediately if exposure is suspected.
  • Never send the secret from a browser or mobile client — it cannot be kept secret there. Call the API from your backend.

Common failures​

StatusError codeCause
400VALIDATION_ERRORclient_id or client_secret missing from the body
401INVALID_CLIENTCredentials are wrong, disabled or revoked
429CLIENT_LOCKED_OUTLocked out after 5 failed attempts
401 on a resource callTOKEN_EXPIRED / TOKEN_INVALIDToken expired, malformed, or missing the organization_id claim
403 on a resource callINSUFFICIENT_SCOPEToken is valid but lacks the required scope — see Scopes
403 on a resource callSENDER_INVALIDX-Sender-Id missing, unknown, inactive or in another organization

See Errors for the full response format.