Skip to content

Session History

Retrieves session history for the authenticated user.

This example assumes using Simli; is in scope and apiKey contains your Simli API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using var client = new SimliClient(apiKey);

// Retrieve session history
var response = await client.GetHistorySessionsAsync();

Console.WriteLine($"Found {response.Sessions?.Count ?? 0} session(s)");
if (response.Sessions is { Count: > 0 })
{
    foreach (var session in response.Sessions)
    {
        Console.WriteLine($"  Session ID: {session.Id}, Duration: {session.SessionTotalTime:F1}s");
    }
}