Quick Start Guide

Get StatPotion game backend running in your Unity, Godot, or JavaScript game in under 5 minutes

What you'll learn:

  • • How to install and initialize the StatPotion SDK
  • • How to save and load player data across devices
  • • How to use live configuration to update game settings
  • • How to track player events for analytics
  • • How to handle authentication and API keys securely
Step 1

Install the StatPotion SDK

Add StatPotion to your project with a single command or file download

Step 2

Initialize the SDK with Your API Key

Set up the SDK with your API key from the StatPotion dashboard. This authenticates your game with our backend services.

Step 3

Save & Load Player Data

Store any JSON data for your players - game progress, settings, achievements, or custom data. Data automatically syncs across devices when players log in.

Step 4

Use Live Configuration

Update game settings, feature flags, and balance values without releasing a new build. Perfect for A/B testing, seasonal events, and quick fixes.

Step 5

Track Player Events

Monitor player behavior, game metrics, and conversion funnels. Events are automatically batched and sent efficiently.

Complete Working Example

Here's everything put together - a complete game integration that saves player data, uses live config for game settings, and tracks player events.

🎉 Congratulations! Your Game Backend is Ready

You now have a complete game backend with player saves, live configuration, and analytics. Your players can save progress across devices and you can update game settings without new releases.

What's Next?

Common Issues & Solutions

Problem: "API key invalid" error

Solution: Verify your API key is correct and the game project is active in your dashboard.

// Check your API key format
const apiKey = "sp_live_1234567890abcdef"; // Should start with sp_live_ or sp_test_

Problem: Save data not syncing across devices

Solution: Ensure players are authenticated with the same device ID or account. Check network connectivity and retry logic.

Problem: Live config values not updating

Solution: Config values are cached for 5 minutes. Force refresh by restarting your game or calling the config endpoint directly.