# Retrieve a list of all Users who are currently online using Platform API

**URL:** <https://community.sendbird.com/t/retrieve-a-list-of-all-users-who-are-currently-online-using-platform-api/403>\
**Category:** API\
**Created:** [June 10, 2020, 10:03am UTC](https://community.sendbird.com/t/retrieve-a-list-of-all-users-who-are-currently-online-using-platform-api/403 "2020-06-10T10:03:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimcarter](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@jimcarter](https://community.sendbird.com/u/jimcarter)\
**Post date:** [June 10, 2020, 10:03am UTC](https://community.sendbird.com/t/retrieve-a-list-of-all-users-who-are-currently-online-using-platform-api/403/1 "2020-06-10T10:03:31Z")

</div>

I had a particular use case where I need to find the user who is currently connected/online but has been idle since threshold mins/hours. In the Platform API, I do have a List Users API however it doesn’t have an ability to send is\_online in the query params. So I would have to ideally call the List Users API, get all the users, iterate over the record set, fetch the is\_online users, check their last\_seen at timestamp.  
Another approach would have been to track it down in my database and then query for only those users, however there is an upper limit of max 250 user ids to be sent in the query param

Is there a better way to basically get around this problem?

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [June 19, 2020, 11:10pm UTC](https://community.sendbird.com/t/retrieve-a-list-of-all-users-who-are-currently-online-using-platform-api/403/2 "2020-06-19T23:10:29Z")

</div>

@jimcarter

It looks like the method you’ve mentioned is likely the best scenario for this. Since the response object of `List Users` returns both the `is_online` and the `last_seen_at` values. If you up the limit to 100 per page, are you still limited to only 2.5 pages of data (250 users)?

If there isn’t a limit to the number of users the `List Users` call returns, it seems like you could quickly iterate over that JSON object to get the data you’re looking for.
