# Beste manier om een lijst van gebruikers uit een groep, en hun biografieën te krijgen (via API)

**URL:** https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332
**Category:** Development
**Tags:** rest-api
**Created:** [14 juni 2023 om 17:23 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332 "2023-06-14T17:23:19Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [14 juni 2023 om 17:23 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/1 "2023-06-14T17:23:19Z")

</div>

I would like to make an API call that would return a list of users in a given user group, along with their bio. I don’t want to be in a position of having to make a new API call for _every_ user to then get their bio.

Is there any way to do this?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [14 juni 2023 om 17:51 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/2 "2023-06-14T17:51:14Z")

</div>

Use the [data explorer](https://meta.discourse.org/t/32566?silent=true) plugin and then [Run Data Explorer queries with the Discourse API](https://meta.discourse.org/t/run-data-explorer-queries-with-the-discourse-api/120063).

---

<div class="post-metadata">

### Author: ![philip-ellis-sp](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@philip-ellis-sp](https://meta.discourse.org/u/philip-ellis-sp)
#### Post date: [14 juni 2023 om 19:00 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/3 "2023-06-14T19:00:02Z")

</div>

Is there any way to do this using the publicly available APIs? We want to be able to access this data from a public site, but it looks like the bio might not be available unless you provide an API key.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [14 juni 2023 om 19:15 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/4 "2023-06-14T19:15:26Z")

</div>

> [@philip-ellis-sp](#):
>
> Is there any way to do this using the publicly available APIs?

I don’t think there’s an endpoint that will give you all group members with their bio. You’ll need to loop through the users to get their bio. You can get group users from something like [https://meta.discourse.org/groups/support-experts/members.json?offset=0&order=&asc=true&filter=](https://meta.discourse.org/groups/support-experts/members.json?offset=0&order=&asc=true&filter=)

> [@philip-ellis-sp](#):
>
> it looks like the bio might not be available unless you provide an API key.

[Profile - pfaffman - Discourse Meta](https://meta.discourse.org/u/pfaffman) shows my bio in an incognito window, so the bio might be available on your site to anonymous users, so you wouldn’t need an API key.

Maybe you want to look at [Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576)

> [@philip-ellis-sp](#):
>
> We want to be able to access this data from a public site

I was once an academic. My wife does discourse analysis with tools like ATLAS.ti and I’ve spent some time pulling data from various sources to be analzed with various tools. Good luck to you!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [14 juni 2023 om 19:18 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/5 "2023-06-14T19:18:16Z")

</div>

> [@pfaffman](#):
>
> [Profile - pfaffman - Discourse Meta](https://meta.discourse.org/u/pfaffman) shows my bio in an incognito window, so the bio might be available on your site to anonymous users, so you wouldn’t need an API key.

I think you’d need to have `hide user profiles from public` toggled off for them to be available for non-users, so that may be worth a check.

---

<div class="post-metadata">

### Author: ![philip-ellis-sp](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@philip-ellis-sp](https://meta.discourse.org/u/philip-ellis-sp)
#### Post date: [14 juni 2023 om 19:25 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/6 "2023-06-14T19:25:39Z")

</div>

Thank you, I didn’t realize this was an option, but changing that allows me to access the details of the users now!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [14 juni 2023 om 19:36 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/7 "2023-06-14T19:36:57Z")

</div>

> [@philip-ellis-sp](#):
>
> changing that allows me to access the details of the users now!

So you ARE an admin but you want to pull the data without using an API key?

> [@philip-ellis-sp](#):
>
> We want to be able to access this data from a public site

So you’re trying to embed these data from a site that you manage onto some other site?

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [14 juni 2023 om 20:07 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/8 "2023-06-14T20:07:52Z")

</div>

> [@pfaffman](#):
>
> So you’re trying to embed these data from a site that you manage onto some other site?

Yes, and it has been successful thanks to your help 🙂

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [14 juli 2023 om 20:08 UTC](https://meta.discourse.org/t/best-way-to-get-via-api-a-list-of-users-from-a-group-and-their-bios/268332/9 "2023-07-14T20:08:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
