Docs
/Docs
Ctrl K
GitHubDashboard
IntroductionQuick StartInstallationConfigurationSelf-Hosting Guide
Unity SDK(soon)
Unreal SDK(soon)
Godot SDK(soon)
Web SDK
Mobile SDKs(soon)
Authentication(soon)
Player DataCloud Save
Leaderboards(soon)
Economy
Analytics(soon)
Remote Config
Push Notifications(soon)
Friends and Social(soon)
AB Testing(soon)
Player Segments(soon)
REST API
Authentication(soon)
Error CodesRate Limits
Webhooks(soon)
Migrating from Other Services(soon)
Best Practices(soon)
Security(soon)
Testing(soon)

Need help?

Join our Discord community for support and updates.

Join Discord
Getting Started

Configuration

Configure your Ondara project.

API Key

Keep your API key secure. Never commit it to version control or expose it in client-side code without proper restrictions configured in the dashboard.

Get your API key from the project settings in the dashboard:

  1. 1.Go to Dashboard
  2. 2.Select your project
  3. 3.Navigate to Settings → API Keys
  4. 4.Copy your API key (or create a new one)
Go to API Keys

Basic Configuration

1// Unity C#
2await Ondara.Initialize("YOUR_API_KEY");
3
4// With options
5await Ondara.Initialize(new OndaraConfig
6{
7 ApiKey = "YOUR_API_KEY",
8 Environment = Environment.Development,
9 LogLevel = LogLevel.Debug
10});

Configuration Options

apiKeystringRequired

Your project's API key from the dashboard

environment'production' | 'development'

Environment mode. Development enables extra logging.

Default:'production'
autoRetryboolean

Automatically retry failed requests with exponential backoff.

Default:true
maxRetriesnumber

Maximum number of retry attempts.

Default:3
timeoutnumber

Request timeout in milliseconds.

Default:30000
offlineModeboolean

Enable offline support with local caching.

Default:true
cacheExpirynumber

Cache expiry time in seconds.

Default:3600
logLevel'none' | 'error' | 'warn' | 'info' | 'debug'

Logging verbosity level.

Default:'warn'

Full Configuration Example

1// Unity C# - Full configuration
2var config = new OndaraConfig
3{
4 ApiKey = "YOUR_API_KEY",
5 Environment = Environment.Development,
6 AutoRetry = true,
7 MaxRetries = 5,
8 Timeout = 60000,
9 OfflineMode = true,
10 CacheExpiry = 7200,
11 LogLevel = LogLevel.Debug,
12
13 // Custom error handler
14 OnError = (error) => Debug.LogError($"Ondara Error: {error.Message}"),
15
16 // Analytics opt-out
17 EnableAnalytics = true,
18};
19
20await Ondara.Initialize(config);

Environment-Specific Configuration

Use different configurations for development and production:

1#if UNITY_EDITOR || DEVELOPMENT_BUILD
2 var apiKey = "dev_api_key_xxx";
3 var environment = Environment.Development;
4#else
5 var apiKey = "prod_api_key_xxx";
6 var environment = Environment.Production;
7#endif
8
9await Ondara.Initialize(new OndaraConfig
10{
11 ApiKey = apiKey,
12 Environment = environment
13});
InstallationUnity SDK