# How do I get a list of all users from the API?

**URL:** https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261
**Category:** Development
**Tags:** rest-api
**Created:** [1월 21, 2015, 9:34오전 UTC](https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261 "2015-01-21T09:34:11Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2월 4, 2016, 8:57오전 UTC](https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261/7 "2016-02-04T08:57:58Z")

</div>

I’d also love to see this, to use in scripts that process the whole user base in some way, like this:

> [@How to programmatically log out lots of users](https://meta.discourse.org/t/how-to-programmatically-log-out-lots-of-users/37611/15):
>
> As an alternative, here is a bit of JavaScript for node.js that iterates over a list of user ids and logs them out using the API: var logoutUsers = function (ids, domain, apiKey, delay) { var nextIndex = 0; var errors = 0; var callNextUrl = function () { if (nextIndex \< ids.length) { var id = ids[nextIndex]; nextIndex++; console.log("logging out " + id); var req = https.request({ hostname: domain, …

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261)._
