Forum Discussion

phani's avatar
phani
Advisor
8 years ago

V2 API: How to get online user details?

Hi,

 

Following query is giving the count of online users

SELECT count(*) FROM users WHERE online_status = 'online' LIMIT 1000

 

But when we are pulling the online users details by using following query, we are not getting online users instead we are getting offline user details

SELECT id,online_status FROM users WHERE online_status = 'online' LIMIT 1000

is there any v2 API to get online user details including avatar?

 

Appreciate your help in this regard.

 

Thanks & Regards,

Phani

  • It looks like the non-count query is not working correctly.

     

    Also, it looks like the count query returns both registered users who are online, as well as anonymous users who are viewing the community/have viewed the community recently.

     

    We have filed a bug to fix both of these issues.

     

    As a workaround, you could instead using the REST V1 users/online/registered call to get information about registered users who are currently online (as well as the users/online/registered/count call to get a count of registered users online).

     

    -Doug

     

     

  • DougS's avatar
    DougS
    Khoros Oracle

    It looks like the non-count query is not working correctly.

     

    Also, it looks like the count query returns both registered users who are online, as well as anonymous users who are viewing the community/have viewed the community recently.

     

    We have filed a bug to fix both of these issues.

     

    As a workaround, you could instead using the REST V1 users/online/registered call to get information about registered users who are currently online (as well as the users/online/registered/count call to get a count of registered users online).

     

    -Doug

     

     

    • phani's avatar
      phani
      Advisor

      Thank you DougS,

       

      We want to pull Avatar of all online users. V1 API is not giving that info in one AP call. So we will look forward for the v2 fix.

       

      Thanks & Regards,

      Phani

  • DougS's avatar
    DougS
    Khoros Oracle
    You could use an endpoint to combine the v1 call with the call to get the avatar.