Skip to main content

Xbox Adapter for Idiomark

Fetches game library, achievements, clips, and profile data from Xbox Live API for personality analysis.

Features​

  • ✅ Profile with gamerscore and tenure
  • ✅ Game library with achievement data
  • ✅ Achievement progress tracking
  • ✅ Game clips (content creation signals)
  • ✅ Activity feed
  • ✅ Friend list and social connections
  • ✅ Rate limiting (200 requests/minute)
  • ✅ OAuth 2.0 authentication via Microsoft Identity Platform

Authentication​

Requires Microsoft OAuth 2.0 access token:

  1. Register your app at Azure Portal
  2. Configure OAuth 2.0 redirect flow
  3. User authorizes and you receive an access token
  4. Use the token with this adapter
import { createXboxAdapter } from '@idiomark/adapter-xbox'

const adapter = createXboxAdapter('YOUR_ACCESS_TOKEN', {
userId: 'xuid(123456789)', // Optional
gamertag: 'Gamertag' // Optional
})

// Authenticate
await adapter.authenticate()

// Fetch data
const data = await adapter.getStructuredOutput({
includeProfile: true,
includeGames: true,
includeAchievements: true,
includeClips: true,
includeActivity: true
})

Personality Signals Extracted​

Signal TypeDescription
Playstyleachievement-focused, social, competitive, casual, or creator
Genre PreferencesMost played game genres
DedicationBased on gamerscore per day
CreativityClip creation frequency
Social GamingMultiplayer focus, party activity
Valuesdedication, creativity, social engagement, competitiveness

API Endpoints Used​

EndpointPurpose
Achievements APIUser achievements
Profile APIUser profile and gamerscore
Titles APIGame library
Activity APIActivity feed
Clips APIGame clips
People/Social APIFriend list

Rate Limits​

  • 200 requests per minute (conservative limit)
  • Automatic throttling built-in

Data Types​

interface XboxProfileStats {
totalGames: number
totalGamerscore: number
totalAchievements: number
achievementCompletionRate: number
clipCount: number
screenshotCount: number
friendCount: number
accountAge: number // Days
favoriteGenres: string[]
mostPlayedGames?: Array<{
name: string
gamerscore: number
}>
activityLevel: 'low' | 'medium' | 'high'
}

Authentication Flow​

The Xbox adapter requires an OAuth 2.0 access token. For production use:

  1. Register App at Azure Portal
  2. Redirect User to Microsoft login
  3. Receive Callback with authorization code
  4. Exchange Code for access token
  5. Get XUID from Xbox profile service

License​

MIT