The official runtime SDK for CinAdmin AR games — one client surface, two language packages, generated from a single shared contract.
| Package | Language | Install |
|---|---|---|
@cinadmin/game-sdk |
TypeScript / JS | npm install @cinadmin/game-sdk |
com.cinadmin.game-sdk |
Unity / C# | UPM Git URL (below) |
game-sdk-contract |
OpenAPI + WS schema | the source of truth both clients are built against |
At showtime a runtime title does three things, and the SDK handles all three:
- Auth — exchanges a short-lived runtime session token and re-mints it
transparently. It never embeds the long-lived
cinadm_sdk_*build token (HC-01): you supply a token-provider callback that mints via your own broker. - Discover / join — finds and joins the session running in a venue.
- The v2 WebSocket — live scores, game messages, player join/leave, with an offline queue that flushes on reconnect.
npm install @cinadmin/game-sdkimport { CinAdminGameClient } from '@cinadmin/game-sdk'
const client = new CinAdminGameClient({
baseUrl: 'https://api.cinadmin.com',
webSocketUrl: 'wss://ws-v2.cinadmin.com',
tokenProvider: async () => {
// Your backend exchanges the build token at POST /api/v1/sdk/session-token
// and returns the short-lived runtime token.
const r = await fetch('https://your-broker.example/runtime-token', { method: 'POST' })
return r.json() // { token, expiresAt }
},
})
const [session] = await client.discoverSessions({ venueId: 'venue-123' })
await client.joinSession(session.sessionId!)
client.on('scoreUpdate', e => console.log(e.playerId, e.score))
await client.openSessionWebSocket(session.sessionId!)Full quickstart: packages/game-sdk/README.md.
In Unity, Window → Package Manager → + → Add package from git URL:
https://github.com/ARGameProject/cinadmin-game-sdk.git?path=/packages/game-sdk-unity
Pin a release by appending #game-sdk-v0.1.0. Integration guide:
packages/game-sdk-unity/INTEGRATION.md.
Two tokens — keep them straight:
- Build token (
cinadm_sdk_*, ~90-day): your GP identity, issued once in the operator portal. Lives only in your backend. Never in an APK or the browser. - Runtime session token (~20-min JWT): the Bearer on every runtime call,
minted by exchanging the build token. This is what the SDK uses, via your
tokenProvidercallback.
Both packages share one semver. The server may enforce a minimum supported
version — a below-floor client is refused with 426 Upgrade Required (HTTP) or an
UPGRADE_REQUIRED error frame (WS). See DISTRIBUTION.md.
UNLICENSED — © SSEL. Distributed for use by CinAdmin platform partners. See
LICENSE.md.