createScenaroClient
ScenaroClientConfig
| Field | Type | Default | Description |
|---|---|---|---|
apiUrl | string | required | API base URL (no trailing slash) |
apiPathPrefix | string | '/v1' | Prepended to all endpoints |
storagePrefix | string | '' | Prefix for localStorage keys |
storage | StorageAdapter | null | localStorage | Custom storage adapter |
ScenaroClient methods
identifyUser
POST /public/token — returns JWT identity. Idempotent if valid token exists in storage.
startSession
POST /public/session — returns Transport credentials (LiveKit today: livekit_token,
livekit_url — see Transport). Requires stored JWT. When language
is omitted, the backend applies the language configured on the scenario.
getValidUserToken
getStoredUserToken
clearStoredSession
getSessionUserId / getSessionApplicationId
JWT utilities
Storage exports
Types
Re-exported from@scenaro/sdk/protocol:
IdentityResponsePublicTokenRequest/PublicTokenResponsePublicSessionRequest/PublicSessionResponseSessionOptions