1

In user's profile page, there's a last seen xx mins ago info:

user profile, partial screenshot

How can I get this information in user object or other object field?

1 Answer 1

0

The user's "Last seen" time is the last_access_date property of the API's user object. Get it via a call to the /users/{ids} route.
For example:
    /2.2/users/50274?site=stackapps

Which currently shows your last_access_date as 1528358274.

In the API, dates are in unix epoch time, so 1528358274 corresponds to Thu, 07 Jun 2018 07:57:54 GMT.

For more information about converting dates/times, see How do I parse the dates from the API?.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .