I am trying to get the total number of users within a Slack workspace. Just the count.
Things I've considered:
users.list
conversations.info
channels:read
). Getting read access to channels seems like a very intrusive permission (even though my app doesn't use it and I don't want to scare off users by requesting this sort of information).Is there an easier way to getting this information or any ideas I have not considered yet? Let me know!
You could make a call to [conversations.members][1]
for the #general channel. It won't return a total number of users but it will return a list of all user ids pertaining to members of that channel, you'd just need count the ids on your end. Every user on a workspace is automatically added to the #general channel. No one can leave that channel nor can it be deleted or archived so it's sure to have the most accurate count of total workspace users. The conversations.members
method does require the channels:read
scope though so that's something to keep in mind.