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

Sorry the reply so late but that’s the first search result for “get list of all users discourse”…

You can implement read-only endpoints with the Data Explorer plugin.

  • Install the plugin
  • Create your query, with inputs if needed
  • Issue a POST request on /admin/plugins/explorer/queries/[id]/run (with [id] being your query ID)

You can also implement paging with limit/offset inputs I guess, but never tried.

For example, I’m using it to check if a given OAuth user ID is already registered on my instance through discourse-oauth2-basic.

4 Likes