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