const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/dashboard/employee-recent-activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"statusCode": 200,
"statusMessage": "Fetched employee recent activity successfully",
"error": null,
"data": {
"meta": {
"totalUsers": 1,
"workModeUsers": 0,
"privacyModeUsers": 0
},
"users": [
{
"userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
"userName": "Sakthivel Govinthan",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/xyz.png",
"presence": {
"currentMode": "workMode",
"modeSinceUtc": "2026-02-11T14:21:41.052Z"
},
"connectedAt": "2026-02-11T12:01:26.450Z"
}
]
}
}Fetch dashboard recent employee activity
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/dashboard/employee-recent-activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"statusCode": 200,
"statusMessage": "Fetched employee recent activity successfully",
"error": null,
"data": {
"meta": {
"totalUsers": 1,
"workModeUsers": 0,
"privacyModeUsers": 0
},
"users": [
{
"userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
"userName": "Sakthivel Govinthan",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/xyz.png",
"presence": {
"currentMode": "workMode",
"modeSinceUtc": "2026-02-11T14:21:41.052Z"
},
"connectedAt": "2026-02-11T12:01:26.450Z"
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.