Skip to main content
Identity is resolved by the SusaPlay shell before your game starts. There is no login flow to build and no identity call to make — by the time Initialize() returns, the player is known.

Reading the current player

SusaPlaySDK.Auth itself is null until Initialize() completes, so reading Auth.Uid before that throws. Await Initialize() first.

Guest sessions

Players can start without an account and play as a guest.
A guest has no platform session, so cloud saves, achievements, the wallet and inventory, analytics and webhook events are refused (401) until the player signs in. Design guest play to work without them: keep a guest’s progress locally and save it after sign-in.

Signing in

Nothing carries over automatically when a guest signs in. A guest earns no platform coins for rewarded ads, but your game’s own reward for a watched ad works for a guest too. The game does not drive the sign-in. A guest’s Uid is null; it is set when the player signs in.

Authentication tokens

The SDK attaches the player’s token to every platform request for you. When your own backend must identify the player, get a session token and send it with your request:
The token is short-lived and scoped to your game, so fetch it each time rather than storing it. Your server checks it with POST https://europe-west1-susaplay-2e8e3.cloudfunctions.net/identity/verify-game-session and body {"token": "..."}; the answer carries uid, gameId, displayName and expiresAt. To tell your own server what happens in the game without a request of your own, send a webhook event: SusaPlay forwards it with the player’s id and a signature your server verifies. SusaPlaySDK.Api is not for your own server — it reaches a partner’s API inside a partner embed (Api and Backend).
Never trust a player id sent from the client. Verify it server-side on every request that grants anything.