Access Gate API
Overview
Quick Start
import RundotGameAPI from '@series-inc/rundot-game-sdk/api'
import { AccessDeniedError } from '@series-inc/rundot-game-sdk'
// Check auth status before making a gated call
if (RundotGameAPI.accessGate.isAnonymous()) {
console.log('User is not logged in')
}
// Gated calls throw AccessDeniedError when blocked
try {
const models = await RundotGameAPI.ai.getAvailableCompletionModels()
console.log('Models:', models)
} catch (error) {
if (error instanceof AccessDeniedError) {
console.log('Login required:', error.requiredTier)
}
}Auto-Prompt Login
Manual Login
Gated APIs and Methods
AI
Method
Description
ImageGen
Method
Description
UGC (write operations only)
Method
Description
Rooms (all methods)
Method
Description
Error Handling
AccessDeniedError
Property
Type
Description
API Reference
RundotGameAPI.accessGate
RundotGameAPI.accessGateMethod / Property
Returns
Description
Types
Best Practices
Last updated