Client settings

Base URL: $PUBLIC_API

The object

uploadsobject · required
Show child attributes
max_file_bytesinteger (int64) · required
sessionobject · required
Show child attributes
refresh_ahead_secondsinteger (int64) · required
challengeobject · optional

Present only when security.challenge.provider is not none.

Show child attributes
providerstring · required

one of builtin, turnstile, hcaptcha, recaptcha

site_keystring · optional
challenge_urlstring (uri) · optional
attributionstring · optional
The object
{
  "uploads": {
    "max_file_bytes": 1
  },
  "session": {
    "refresh_ahead_seconds": 1
  },
  "challenge": {
    "provider": "builtin",
    "site_key": "site key",
    "challenge_url": "https://example.org/",
    "attribution": "attribution"
  }
}

Rules the server enforces that clients need before a request

Logs

GET /client-settings

The largest file an upload may carry (storage.uploads.max_file_bytes) and how long before an access token expires to renew it (security.token_refresh_ahead), so no client repeats them in its own code. Clients that cannot read it keep working: the server enforces the limit, and a 401 still triggers a refresh.

Returns

200 Client settings

Show attributes
uploadsobject · required
Show child attributes
max_file_bytesinteger (int64) · required
sessionobject · required
Show child attributes
refresh_ahead_secondsinteger (int64) · required
challengeobject · optional

Present only when security.challenge.provider is not none.

Show child attributes
providerstring · required

one of builtin, turnstile, hcaptcha, recaptcha

site_keystring · optional
challenge_urlstring (uri) · optional
attributionstring · optional
curl -X GET "$PUBLIC_API/client-settings"
Response 200
{
  "uploads": {
    "max_file_bytes": 1
  },
  "session": {
    "refresh_ahead_seconds": 1
  },
  "challenge": {
    "provider": "builtin",
    "site_key": "site key",
    "challenge_url": "https://example.org/",
    "attribution": "attribution"
  }
}