Skip to content

AppSettingsManager

Application Settings Manager

Manages high-level application settings with a structured API. Provides type-safe access to authentication, features, email, and security settings.

const settings = client.admin.settings.app
// Get all app settings
const appSettings = await settings.get()
console.log(appSettings.authentication.enable_signup)
// Update specific settings
const updated = await settings.update({
authentication: {
enable_signup: true,
password_min_length: 12
}
})
// Reset to defaults
await settings.reset()

new AppSettingsManager(fetch): AppSettingsManager

ParameterType
fetchFluxbaseFetch

AppSettingsManager

configureMailgun(apiKey, domain, options?): Promise<AppSettings>

Configure Mailgun email provider

Convenience method to set up Mailgun email delivery.

ParameterTypeDescription
apiKeystringMailgun API key
domainstringMailgun domain
options?objectOptional EU region flag and email addresses
options.eu_region?boolean-
options.from_address?string-
options.from_name?string-
options.reply_to_address?string-

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.configureMailgun('key-xxx', 'mg.yourapp.com', {
eu_region: false,
from_address: 'noreply@yourapp.com',
from_name: 'Your App'
})

configureSendGrid(apiKey, options?): Promise<AppSettings>

Configure SendGrid email provider

Convenience method to set up SendGrid email delivery.

ParameterTypeDescription
apiKeystringSendGrid API key
options?objectOptional from address, name, and reply-to
options.from_address?string-
options.from_name?string-
options.reply_to_address?string-

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.configureSendGrid('SG.xxx', {
from_address: 'noreply@yourapp.com',
from_name: 'Your App'
})

configureSES(accessKeyId, secretAccessKey, region, options?): Promise<AppSettings>

Configure AWS SES email provider

Convenience method to set up AWS SES email delivery.

ParameterTypeDescription
accessKeyIdstringAWS access key ID
secretAccessKeystringAWS secret access key
regionstringAWS region (e.g., ‘us-east-1’)
options?objectOptional email addresses
options.from_address?string-
options.from_name?string-
options.reply_to_address?string-

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.configureSES(
'AKIAIOSFODNN7EXAMPLE',
'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
'us-east-1',
{
from_address: 'noreply@yourapp.com',
from_name: 'Your App'
}
)

configureSMTP(config): Promise<AppSettings>

Configure SMTP email provider

Convenience method to set up SMTP email delivery.

ParameterTypeDescription
configobjectSMTP configuration
config.from_address?string-
config.from_name?string-
config.hoststring-
config.passwordstring-
config.portnumber-
config.reply_to_address?string-
config.use_tlsboolean-
config.usernamestring-

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.configureSMTP({
host: 'smtp.gmail.com',
port: 587,
username: 'your-email@gmail.com',
password: 'your-app-password',
use_tls: true,
from_address: 'noreply@yourapp.com',
from_name: 'Your App'
})

deleteSetting(key): Promise<void>

Delete a custom setting

ParameterTypeDescription
keystringSetting key to delete

Promise<void>

Promise

await client.admin.settings.app.deleteSetting('billing.tiers')

disableSignup(): Promise<AppSettings>

Disable user signup

Convenience method to disable user registration.

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.disableSignup()

enableSignup(): Promise<AppSettings>

Enable user signup

Convenience method to enable user registration.

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.enableSignup()

get(): Promise<AppSettings>

Get all application settings

Returns structured settings for authentication, features, email, and security.

Promise<AppSettings>

Promise resolving to AppSettings

const settings = await client.admin.settings.app.get()
console.log('Signup enabled:', settings.authentication.enable_signup)
console.log('Realtime enabled:', settings.features.enable_realtime)
console.log('Email provider:', settings.email.provider)

getSetting(key): Promise<any>

Get a specific custom setting’s value only (without metadata)

Convenience method that returns just the value field instead of the full CustomSetting object.

ParameterTypeDescription
keystringSetting key (e.g., ‘billing.tiers’, ‘features.beta_enabled’)

Promise<any>

Promise resolving to the setting’s value

const tiers = await client.admin.settings.app.getSetting('billing.tiers')
console.log(tiers) // { free: 1000, pro: 10000, enterprise: 100000 }

getSettings(keys): Promise<Record<string, any>>

Get multiple custom settings’ values by keys

Fetches multiple settings in a single request and returns only their values.

ParameterTypeDescription
keysstring[]Array of setting keys to fetch

Promise<Record<string, any>>

Promise resolving to object mapping keys to values

const values = await client.admin.settings.app.getSettings([
'billing.tiers',
'features.beta_enabled'
])
console.log(values)
// {
// 'billing.tiers': { free: 1000, pro: 10000 },
// 'features.beta_enabled': { enabled: true }
// }

listSettings(): Promise<CustomSetting[]>

List all custom settings

Promise<CustomSetting[]>

Promise resolving to array of CustomSetting objects

const settings = await client.admin.settings.app.listSettings()
settings.forEach(s => console.log(s.key, s.value))

reset(): Promise<AppSettings>

Reset all application settings to defaults

This will delete all custom settings and return to default values.

Promise<AppSettings>

Promise resolving to AppSettings - Default settings

const defaults = await client.admin.settings.app.reset()
console.log('Settings reset to defaults:', defaults)

setEmailEnabled(enabled): Promise<AppSettings>

Enable or disable email functionality

Convenience method to toggle email system on/off.

ParameterTypeDescription
enabledbooleanWhether to enable email

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.setEmailEnabled(true)

setEmailVerificationRequired(required): Promise<AppSettings>

Enable or disable email verification requirement

Convenience method to require email verification for new signups.

ParameterTypeDescription
requiredbooleanWhether to require email verification

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.setEmailVerificationRequired(true)

setFeature(feature, enabled): Promise<AppSettings>

Enable or disable a feature

Convenience method to toggle feature flags.

ParameterTypeDescription
feature"functions" | "realtime" | "storage"Feature name (‘realtime'
enabledbooleanWhether to enable or disable the feature

Promise<AppSettings>

Promise resolving to AppSettings

// Enable realtime
await client.admin.settings.app.setFeature('realtime', true)
// Disable storage
await client.admin.settings.app.setFeature('storage', false)

setPasswordComplexity(requirements): Promise<AppSettings>

Configure password complexity requirements

Convenience method to set password validation rules.

ParameterTypeDescription
requirementsobjectPassword complexity requirements
requirements.min_length?number-
requirements.require_lowercase?boolean-
requirements.require_number?boolean-
requirements.require_special?boolean-
requirements.require_uppercase?boolean-

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.setPasswordComplexity({
min_length: 12,
require_uppercase: true,
require_lowercase: true,
require_number: true,
require_special: true
})

setPasswordMinLength(length): Promise<AppSettings>

Update password minimum length

Convenience method to set password requirements.

ParameterTypeDescription
lengthnumberMinimum password length (8-128 characters)

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.setPasswordMinLength(12)

setRateLimiting(enabled): Promise<AppSettings>

Enable or disable global rate limiting

Convenience method to toggle global rate limiting.

ParameterTypeDescription
enabledbooleanWhether to enable rate limiting

Promise<AppSettings>

Promise resolving to AppSettings

await client.admin.settings.app.setRateLimiting(true)

setSessionSettings(timeoutMinutes, maxSessionsPerUser): Promise<AppSettings>

Configure session settings

Convenience method to set session timeout and limits.

ParameterTypeDescription
timeoutMinutesnumberSession timeout in minutes (0 for no timeout)
maxSessionsPerUsernumberMaximum concurrent sessions per user (0 for unlimited)

Promise<AppSettings>

Promise resolving to AppSettings

// 30 minute sessions, max 3 devices per user
await client.admin.settings.app.setSessionSettings(30, 3)

setSetting(key, value, options?): Promise<CustomSetting>

Set or create a custom setting

Creates a new custom setting or updates an existing one.

ParameterTypeDescription
keystringSetting key
valueanySetting value (any JSON-serializable value)
options?objectOptional configuration (description, is_public, is_secret, etc.)
options.description?string-
options.is_public?boolean-
options.is_secret?boolean-
options.value_type?string-

Promise<CustomSetting>

Promise resolving to CustomSetting

await client.admin.settings.app.setSetting('billing.tiers', {
free: 1000,
pro: 10000,
enterprise: 100000
}, {
description: 'API quotas per billing tier',
is_public: false
})

update(request): Promise<AppSettings>

Update application settings

Supports partial updates - only provide the fields you want to change.

ParameterTypeDescription
requestUpdateAppSettingsRequestSettings to update (partial update supported)

Promise<AppSettings>

Promise resolving to AppSettings - Updated settings

// Update authentication settings
const updated = await client.admin.settings.app.update({
authentication: {
enable_signup: true,
password_min_length: 12
}
})
// Update multiple categories
await client.admin.settings.app.update({
authentication: { enable_signup: false },
features: { enable_realtime: true },
security: { enable_global_rate_limit: true }
})