Skip to main content

SessionInfo

Returns details about the current session, including when it was created and when it expires.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature

SessionIDInfo SessionInfo(string SessionID)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token obtained from Login

Response Object — SessionIDInfo

FieldTypeDescription
SessionIDstringThe session token (mirrors the input)
UserIDintNumeric ID of the user who owns the session
NetworkIDintNetwork ID associated with the session
MailboxIDintDefault mailbox ID for the session
CreateddateTimeUTC timestamp when the session was created
ExpiresdateTimeUTC timestamp when the session will expire
<!-- Example response -->
<SessionInfoResponse xmlns="http://www.ecgridos.net/">
<SessionInfoResult>
<SessionID>A1B2C3D4-E5F6-7890-ABCD-EF1234567890</SessionID>
<UserID>12345</UserID>
<NetworkID>100</NetworkID>
<MailboxID>200</MailboxID>
<Created>2026-05-07T10:00:00Z</Created>
<Expires>2026-05-07T11:00:00Z</Expires>
</SessionInfoResult>
</SessionInfoResponse>

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
using var client = new ECGridOSClient(binding, endpoint);

SessionIDInfo session = await client.SessionInfoAsync(sessionID);

Console.WriteLine($"Session created: {session.Created:O}");
Console.WriteLine($"Session expires: {session.Expires:O}");

// Check if the session is close to expiring and re-authenticate if needed
if (session.Expires - DateTimeOffset.UtcNow < TimeSpan.FromMinutes(5))
{
// Re-authenticate before the session lapses
}

REST Equivalent

See SessionPOST /v2/auth/session.