Skip to main content
GET
/
auth
/
sessions
cURL
curl --request GET \
  --url https://api.lightspark.com/grid/2025-10-13/auth/sessions \
  --header 'Authorization: Basic <encoded-value>'
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const sessionListResponse = await client.auth.sessions.list({ accountId: 'accountId' });

console.log(sessionListResponse.data);
package com.lightspark.grid.example

import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.auth.sessions.SessionListParams
import com.lightspark.grid.models.auth.sessions.SessionListResponse

fun main() {
val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()

val params: SessionListParams = SessionListParams.builder()
.accountId("accountId")
.build()
val sessionListResponse: SessionListResponse = client.auth().sessions().list(params)
}
{
  "data": [
    {
      "id": "Session:019542f5-b3e7-1d02-0000-000000000003",
      "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
      "nickname": "example@lightspark.com",
      "createdAt": "2026-04-08T15:30:01Z",
      "updatedAt": "2026-04-08T15:35:00Z",
      "expiresAt": "2026-04-09T15:30:01Z",
      "credentialId": "KEbWNCc7NgaYnUyrNeFGX9_3Y-8oJ3KwzjnaiD1d1LVTxR7v3CaKfCz2Vy_g_MHSh7yJ8yL0Pxg6jo_o0hYiew",
      "encryptedSessionSigningKey": "w99a5xV6A75TfoAUkZn869fVyDYvgVsKrawMALZXmrauZd8hEv66EkPU1Z42CUaHESQjcA5bqd8dynTGBMLWB9ewtXWPEVbZvocB4Tw2K1vQVp7uwjf"
    }
  ]
}
{
"status": 400,
"message": "<string>",
"details": {}
}
{
"status": 401,
"message": "<string>",
"details": {}
}
{
"status": 500,
"message": "<string>",
"details": {}
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Query Parameters

accountId
string
required

Internal account id whose sessions to list.

Response

Active authentication sessions on the internal account. Returns an empty data array when the internal account has no active sessions or when accountId does not match any internal account visible to the caller.

data
Authentication Session · object[]
required

List of active authentication sessions for the internal account.