How to Fetch Agent Login and Logout Timestamps


We are trying to fetch agent login and logout timestamps but were unsuccessful, We have tried using the /api/v2/users get call by using the expand options like ['routingStatus', "presence", "outOfOffice", "dateLastLogin", "lasttokenissued"] but couldn't find the related and also tried the user details query as well.

Can someone let me know if there is a way we get the login/logout times of the agents.

Thanks in advance.


It sounds like /api/v2/analytics/users/aggregates/query is what you are looking for. This article should explain how to use it /api/v2/analytics/users/details/query should also provide the info you need. Here is an example of how to use the endpoint,

Also, are you using the ruby SDK for this?


Hi Declan,

The above API's just give us the presence status and the routing status that we can be obtained using the get all users with expand option but i need the exact login and logout time of the agents
And currently we are using python SDK.


@varunpintu23 please be aware that Genesys Cloud does not have any concept of "logged in" or "logged out". There is no data for such a thing because that's not how Genesys Cloud works. Using presence data is the closest approximation to for what you're looking for. If you're trying to do payroll or determine "work time" for agents, using an actual physical timeclock or 3rd party virtual time tracking software is the recommended approach.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.