[Question] Query total users count

I have a requirement to query the total number of users within our SendBird application. No where in the dashboard do I see this information. To my knowledge this functionality does not exist in the platform API.

Currently I have to hit list users with the max limit (100), and iterate forward using the next token until the end. Currently we have 20k+ users and this requires 200+ API calls. We do have a means of managing our request rate.

This is highly inefficient and I have not been able to find another solution to procure this information.

On top of that, the last page token in our request chain consistently throws a 500 error with no details. After several attempts the final page will respond.

Any insight or assistance would be greatly appreciated.

@jhnbkr

Hi there. I hope you are well. Thank you for posting your issue. The points you raise are valid, and note worthy.

Please can I asked your use case for fetching all of your organisation’s users. Knowing the use case will help me to recommend some solutions.

Relating to the 500 error, I will reproduce this and file a bug report to our engineers.

Thanks for the response @Jason. Our use case is for data integrity validation. We create/update a SendBird user for every user in our system. This is done asynchronously through our task queue. Periodically I wish to audit the number of users in our SendBird application and compare the result to our service’s backend.

In addition it would be useful for an API that lists resources should return additional metadata; total results, current page, total pages, and next/prev tokens.

I can see a few other use cases for such data (users, and more) that revolve around generating reports, and internal tools/dashboards.

@jhnbkr

The use case you describe seems to be a case for Sendbird’s data export service. Regarding the other points about additional details on the API callback, I think they are very valuable and will ask our engineering team.

I’m having the same difficult, but in my case i need to filter an user to start a channel. The filter done in sendbird chat using Javascript is limited for 30 users in the list. Can you @Jason help me?