How to track the login activity of any user through API

Is there any way we can track the login activity of any user through API.
We need to know when was the last time a user logged in to their GitHub account.

Hi there,

There’s no result in the REST API specifically for the login event, but you can get general (public facing) user information at this address:

https://api.github.com/users/[USERNAME]

If you’re using the GRAPHQL API, you’ll want to check out this page for what information is available:

Cheers,
Billy

1 Like