# Return active cPanel sessions

This function returns the active cPanel sessions for the current user,
so the account owner can review where their account is currently signed
in and spot a session they do not recognize.

Note:

 This function returns an array, so UAPI's generic api.filter_,
  api.sort_ and api.paginate_ parameters apply, and a
  caller-supplied sort replaces the default ordering of the data
  return value.
* Session addresses are private, so this function is unavailable to demo
  (shared) accounts.

Endpoint: GET /ActiveSessions/list_active_sessions
Version: 11.138.0.10
Security: BasicAuth

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "list_active_sessions"

  - `module` (string)
    The name of the module called.
    Example: "ActiveSessions"

  - `result` (object)

  - `result.data` (array)
    The current user's active sessions, current session
first, then the rest by most recently active.

Note:
Empty when the user has no unexpired sessions, and
also when the function cannot read the session store.

  - `result.data.ip_address` (string)
    Remote address the session connects from. Empty
when the session recorded none.
    Example: "192.0.2.0"

  - `result.data.is_current` (integer)
    Whether this is the session that made this
request.

* 1 - This is the current session.
* 0 - It is another session.
    Enum: 1, 0

  - `result.data.is_possessed` (integer)
    Whether an operator, such as the account's
reseller or root, is acting as the user through
this session.

* 1 - The session is being operated on the
  user's behalf.
* 0 - The user signed in directly.
    Enum: 1, 0

  - `result.data.last_active` (integer)
    Unix timestamp of the session's last activity,
taken from the session file's modification time.
    Example: 1755520392

  - `result.data.login_theme` (string)
    The interface the session logged in to, for example cpanel or webmail.
    Example: "cpanel"

  - `result.data.tfa_verified` (integer)
    Whether two-factor authentication was completed
for this session.

* 1 - Two-factor authentication was completed.
* 0 - It was not.
    Enum: 1, 0

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more
  details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings
describe non-critical failures or other problematic
conditions noted while running an API.


