Rules the server enforces that clients need before a request
LogsGET /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
uploadsShow child attributes
max_file_bytes
sessionShow child attributes
refresh_ahead_seconds
challengePresent only when security.challenge.provider is not none.
Show child attributes
providerone of
builtin,turnstile,hcaptcha,recaptchasite_keychallenge_urlattribution
curl -X GET "$PUBLIC_API/client-settings"
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$PUBLIC_API/client-settings", {
method: "GET"
});
const data = await res.json();
import requests
res = requests.get(
"$PUBLIC_API/client-settings"
)
data = res.json()
req, _ := http.NewRequest("GET", "$PUBLIC_API/client-settings", nil)
resp, err := http.DefaultClient.Do(req)
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"
}
}