Skip to content
Torii docs

Get environment configuration

GET
/_torii/environment
curl --request GET \
--url https://your-app.torii.so/_torii/environment

Single discovery call. Returns the SDK’s env-public bundle.

Host
string

OK

Media type application/json

Aggregated environment-public config the SDK uses on cold load.

object
environment
required

Environment type literal (e.g. SANDBOX, PRODUCTION).

string
turnstileSiteKey

Cloudflare Turnstile site key. Null when CAPTCHA is disabled.

string | null
legal
required

Legal-consent settings driving the signup form’s checkbox.

object
requireConsent
required

When true, the SDK signup form shows a checkbox the user must tick.

boolean
termsOfServiceUrl

Public URL to the Terms of Service, or null.

string | null
privacyPolicyUrl

Public URL to the Privacy Policy, or null.

string | null
oauthProviders
required

OAuth providers enabled for this environment.

Array<object>

Single enabled OAuth provider as it appears in the boot bundle.

object
name
required
string
displayName
required
string
issuer
required
string
signupEnabled
required

Whether end-user signup is allowed on this deployment.

boolean
brandingRequired
required

Whether the “Powered by Torii.so” footer is required (tier gate).

boolean
Example generated
{
"environment": "example",
"turnstileSiteKey": "example",
"legal": {
"requireConsent": true,
"termsOfServiceUrl": "example",
"privacyPolicyUrl": "example"
},
"oauthProviders": [
{
"name": "example",
"displayName": "example",
"issuer": "example"
}
],
"signupEnabled": true,
"brandingRequired": true
}