Skip to content

Member Service

The Member service provides access to member profiles, statistics, awards, and participation data.

const memberService = iracing.member;

Get information about the authenticated member.

Returns: Promise<MemberInfoResponse>

Parameters: None

Description: Returns detailed information about the currently authenticated member including profile data, licenses, and account status.


Get information about specific members by customer ID.

Returns: Promise<MemberGetResponse>

Parameters:

  • custIds: number[] - Array of customer IDs (max 50)
  • includeLicenses?: boolean - Include license information

Description: Fetches profile information for up to 50 members at once.


Get public profile information for a member.

Returns: Promise<MemberProfileResponse>

Parameters:

  • custId: number - Customer ID

Description: Returns public profile data visible to other members.


Get member’s earned awards and achievements.

Returns: Promise<MemberAwardsResponse>

Parameters:

  • custId: number - Customer ID

Description: Lists all awards and achievements earned by the member.


Get specific instances of awards earned.

Returns: Promise<MemberAwardInstancesResponse>

Parameters:

  • custId: number - Customer ID
  • awardId?: number - Specific award ID to filter

Description: Returns detailed information about when and how awards were earned.


Get chart data for member statistics over time.

Returns: Promise<MemberChartDataResponse>

Parameters:

  • custId: number - Customer ID
  • categoryId: number - Category ID (1=Oval, 2=Road, 3=Dirt Oval, 4=Dirt Road)
  • chartType: number - Type of chart data

Description: Returns time-series data for graphing member performance.


Get participation credit balance for the authenticated member.

Returns: Promise<MemberParticipationCreditsResponse>

Parameters: None

Description: Returns the current balance of participation credits earned through racing.

async function getCompleteProfile(custId: number) {
const [member, profile, awards, recentRaces] = await Promise.all([
iracing.member.get({ custIds: [custId] }),
iracing.member.profile({ custId }),
iracing.member.awards({ custId }),
iracing.stats.memberRecentRaces({ custId })
]);
return {
basic: member.members[0],
profile: profile,
awards: awards.awards,
recentRaces: recentRaces.races
};
}
async function trackIRatingChange(custId: number, categoryId: number) {
const chartData = await iracing.member.chartData({
custId,
categoryId,
chartType: 1 // iRating chart
});
const recent = chartData.data.slice(-10); // Last 10 data points
const change = recent[recent.length - 1].value - recent[0].value;
console.log(`iRating change over last 10 races: ${change > 0 ? '+' : ''}${change}`);
}
async function checkLicenseProgress(custId: number) {
const member = await iracing.member.get({
custIds: [custId],
includeLicenses: true
});
member.members[0].licenses.forEach(license => {
const sr = license.safetyRating / 100; // Convert to decimal
const nextLevel = Math.ceil(sr);
const progress = ((sr % 1) * 100).toFixed(0);
console.log(`${license.categoryName}:`);
console.log(` Class ${license.licenseLevel} - SR: ${sr.toFixed(2)}`);
console.log(` Progress to Class ${String.fromCharCode(65 + nextLevel)}: ${progress}%`);
});
}
try {
const info = await iracing.member.info();
} catch (error) {
if (error instanceof IRacingError) {
if (error.isUnauthorized) {
console.error('Not authenticated');
} else if (error.status === 404) {
console.error('Member not found');
}
}
}

All methods return fully typed responses. Key types include:

  • MemberInfoResponse - Complete member information
  • MemberGetResponse - Public member data
  • License - License level and safety rating
  • Club - Club membership information
  • Award - Achievement and award data