box api - User's last login time? -


i'd know when given user last logged in. seems user object doesn't include information (creation , modification only). should leverage events api (seems inefficient) or missing obvious?

yes, events api this. specifically, you'll want use enterprise events api , query events of type login. requires access token administrative privileges.

curl https://api.box.com/2.0/events?stream_type=admin_logs&event_type=login \ -h "authorization: bearer access_token" 

note that:

  • the returned events paged, may need adjust page size or execute multiple queries find event(s) you're looking for.
  • you can use created_after , created_before query parameters limit returned events specific time period.
  • you can failed_login events: event_type=login,failed_login

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -