Get Last Activity Of User

🕵️ Retrieve Last User Activity (Command: 26)

📘 Description

This endpoint returns how many seconds ago the user was last active, along with the exact timestamp of their last activity.

It is useful for tracking session inactivity, determining auto-logouts, or monitoring engagement.


📜Sample JSON Request (from your server to the RGS-CWS server)

{ "command": "26", "login": "demoaccount", "pass": "123456" , "apiusername": "123456" , "apipass": "123456" }

🔐 Note: The input must be sent to the API URL, similarly to all the other commands. All field names and values are case-sensitive.


📥 Input Parameters (from your server to the RGS-CWS server)

Parameter

Mandatory

Description

Type

command

Must be "26"

string

*login

Username (min. 6 characters). Required unless userid is used instead

string

userid

RGS-CWS user ID. Optional alternative to login, but cannot be used together with login. *You must provide either login or userid — not both.

string

*pass

User's password (min. 6 characters). Can be hashed

string

*apiusername

API Username

string

*apipass

API Password

string

*You must provide either login or userid — not both.


📃Sample JSON Response (returned by CWS-RGS)

{ "seconds_ago": 121, "last_activity": "2025-07-04 14:45:39" }

📤 Output Parameters (returned by CWS-RGS)

Parameter

Required

Description

Type

seconds_ago

Time since last activity (in seconds)

number

last_activity

Timestamp of the last activity (Y-m-d H:i:s)

string