Getting Started
This guide takes you from an empty account to a signed-in player in about ten minutes: create a project in the dashboard, copy the SDK key, install the client SDK, log in with a device ID, and make your first protected call.
Base endpoints
Section titled “Base endpoints”| Endpoint | URL |
|---|---|
| API (game clients and game servers) | https://api.rudder.build |
| Dashboard | https://app.rudder.build/ |
1. Create a project
Section titled “1. Create a project”- Sign up at app.rudder.build with your email and password. New accounts start in a pending state and are unlocked once approved.
- Open the Projects page and click Create Project. A name is all you need.
A project is the top-level container for everything: players, counters, installed modules and their data, and keys. Creating a project automatically creates its two environments — staging and prod — each with its own SDK key and its own admin key. A project always has exactly these two. You author content in staging, where you also get a full sandbox with its own players, and promote it to prod, which is what your shipped build reads. See Projects & Environments for the full model.
2. Get your SDK key
Section titled “2. Get your SDK key”Open your project and go to Project Settings. The SDK Key field shows the key for the environment currently selected in the dashboard’s environment switcher — switch between staging and prod to see each key.
The SDK key is safe to ship in a game client: it identifies the project and environment, and it is used only at login. If a key leaks, use Generate next to it to rotate it — the old key stops working immediately.
Project Settings also shows an Admin Key, likewise per environment. That one is a secret for server-side admin calls to the /game/v1 HTTP API — the key decides which environment your server acts on, and it must never go into a shipped client.
3. Install the SDK
Section titled “3. Install the SDK”The package is published to the Rudder registry, not npmjs. Point the @rudder scope at it in your project’s .npmrc:
@rudder:registry=https://hub.rudder.build/api/packages/rudder/npm/Then install (anonymous read access, no token needed):
npm install @rudder/sdkdotnet nuget add source https://hub.rudder.build/api/packages/rudder/nuget/index.json --name rudderdotnet add package Rudder.Sdk --version 0.1.0Targets netstandard2.1, so it works in .NET, Unity, and Xamarin. For Unity, install the build.rudder.sdk UPM package instead — see the Unity SDK page.
4. Initialize the client and log in
Section titled “4. Initialize the client and log in”import { createClient } from '@rudder/sdk';
const client = createClient({ projectKey: 'your-sdk-key', // the SDK key from Project Settings});
// Signs the player in with a device ID. The ID is generated on first call// and persisted in localStorage, so the same browser keeps the same player.await client.auth.loginWithDevice();// optionally: loginWithDevice({ region: 'eu', language: 'de', nickname: 'Bob' })using RudderSdk;
var client = new RudderClient(new RudderClientOptions{ BaseUrl = "https://api.rudder.build", ProjectKey = "your-sdk-key", // the SDK key from Project Settings});
// Signs the player in with a device ID.await client.Auth.LoginWithDeviceAsync(region: "global", language: "en");The default DeviceIdProvider generates a random GUID per client instance. To keep the same player across app restarts, inject your own IDeviceIdProvider that persists the ID. (The Unity package does this for you via PlayerPrefs.)
Device login needs no player credentials: the first call with a new device ID creates the player, later calls sign that player back in. Access and refresh tokens are stored by the SDK and refreshed automatically on expiry — you don’t handle tokens yourself. Other login options (a custom webhook against your own backend) are covered in Authentication.
5. Make your first protected call
Section titled “5. Make your first protected call”Everything except login requires a signed-in player. Read the player’s profile, wallets and counters:
const profile = await client.player.load();console.log(profile.player?.id, profile.wallets, profile.counters);
// `client.player` is a state object: subscribe to updates, or read `.value`// for the cached value after login.client.player.onChange(({ value }) => console.log(value?.player?.nickname));var profile = await client.Player.LoadAsync();Console.WriteLine(profile.Player?.Id);
// Keep state fresh: poll revisions in the background (Unity does this for you)._ = client.Sync.RunAsync(CancellationToken.None);If the access token has expired, the SDK refreshes it and retries the call once, transparently.
6. Ship content to prod
Section titled “6. Ship content to prod”Module installs and resource rows (items, offers, quests, boards, configs) are live in their environment as soon as you save them; counters take effect after a release. Author and test in staging, then promote to prod, which is what your shipped build reads. For a first end-to-end test: install the remote_config module in staging, create a config, generate a typed client with rudder client generate (see Generated module clients), and call remoteConfig.get using the staging SDK key. The full flow is described in Releases & Publishing and the Releases guide.
Where to go next
Section titled “Where to go next”- Projects & Environments — how projects, environments, and keys fit together.
- Releases & Publishing — snapshots, promotion, and rollback.
- Authentication — device and custom webhook login, bans, token lifecycle.
- Feature guides: Modules, Generated module clients, First-party modules, Wallet & Inventory, Counters.
- SDK references: TypeScript, C#, Unity. Game servers call the
/game/v1HTTP API directly.