API ReferenceActivity
User Activity
Get the activity snapshot (totals, streak, online status) for a single Roblox user in the workspace.
GET /api/activity/users/{robloxId}Returns the current activity snapshot for one Roblox user inside the authenticated workspace. Use this to display a player's total tracked time, current streak, and whether they are online right now.
Returns 404 if the user has no activity record in this workspace. The API does not distinguish "user does not exist" from "user has never been tracked" to avoid leaking the membership of other workspaces.
Headers
Prop
Type
Path Parameters
Prop
Type
curl https://api.rankgun.works/api/activity/users/123456789 \
-H "x-api-key: YOUR_API_KEY"Response
200 OK
{
"success": true,
"user": {
"robloxId": 123456789,
"robloxUsername": "Builderman",
"displayName": "Build",
"totalTimeSeconds": 18402,
"timeThisPeriod": 540,
"streakDays": 4,
"isOnline": true,
"lastPingAt": 1745000000,
"currentSessionStart": 1744999700,
"periodStartAt": 1744934400
}
}All timestamp fields are seconds since epoch (Unix time). Activity totals (totalTimeSeconds, timeThisPeriod) are durations in seconds.
user
Prop
Type
Errors
| Status | Meaning |
|---|---|
400 | Invalid robloxId (non-numeric, zero, or negative). |
401 | Missing API key. |
403 | Invalid API key, workspace deactivated, or monthly limit exceeded. |
404 | No activity record for this user in this workspace. |
500 | Internal server error. |
Was this page helpful?