Xbox and PlayFab services API for Node.js.
Node.js 24 or newer is required. The API is experimental; coordinate version updates with consumers.
const { XboxClient } = require('prismarine-xbox-services')
const { Authflow } = require('prismarine-auth')
const auth = new Authflow(username, cacheDirectory, authOptions)
const xbox = new XboxClient(auth)
const profile = await xbox.getProfile('me')Supply your existing Authflow; sign-in, token acquisition, caching and refresh stay in prismarine-auth. The package has no runtime dependency on prismarine-auth and accepts compatible credential providers.
- XboxClient and XboxSession: profiles, multiplayer sessions, invitations, and activity publishing with caller-provided title configuration.
- XboxRTASocket: Real Time Activity connections, subscriptions and lifecycle management.
- PlayFabClient: isolated authenticated PlayFab requests with caller-provided credentials and title ID.
Minecraft title defaults, world metadata and game protocol behavior belong to consumers. The focus is services needed by Minecraft clients and bots, with reusable configuration for other applications. See the migration guide, architecture proposal and Xbox RTA reference implementation.
Tests cover mocked service boundaries and local WebSocket connections. Live authenticated Xbox and PlayFab integration still needs verification with title-specific credentials.
Use Node.js 24 or newer.
git clone https://github.com/PrismarineJS/prismarine-xbox-services.git
cd prismarine-xbox-services
npm install
npm testnpm test runs lint and tests. Use npm run fix to apply JavaScript Standard Style fixes.
See CONTRIBUTING.md for contribution and release notes.
MIT.