# גישה למינוי של קבוצות בלתי נראות באמצעות API

**URL:** https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606
**Category:** Support
**Created:** [22 בספטמבר,‏ 2015,‏ 7:22pm UTC](https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606 "2015-09-22T19:22:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![OnceWas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oncewas/32/40734_2.png) [@OnceWas](https://meta.discourse.org/u/OnceWas)
#### Post date: [22 בספטמבר,‏ 2015,‏ 7:22pm UTC](https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606/1 "2015-09-22T19:22:09Z")

</div>

I am trying to use the API to determine if a user is a member of a group that has “Group is visible to all users” unchecked. Even when I use an admin API username and key when pulling in a user profile (via `/users/username.json`), the json that is returned only lists the groups that are visible to all users (i.e. where user-\>custom\_groups-\>visible is true).

Is there any way to get the membership of custom groups that are visible:false from the user profile? It seems like an admin API user and key should have access to that information.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [22 בספטמבר,‏ 2015,‏ 8:23pm UTC](https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606/2 "2015-09-22T20:23:58Z")

</div>

Try `/admin/users/username.json` ?

---

<div class="post-metadata">

### Author: ![OnceWas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oncewas/32/40734_2.png) [@OnceWas](https://meta.discourse.org/u/OnceWas)
#### Post date: [22 בספטמבר,‏ 2015,‏ 8:26pm UTC](https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606/3 "2015-09-22T20:26:37Z")

</div>

That works, thanks!

I’ll just have to make two API calls, one for the public profile information, and one for the admin-visible profile information.

---

<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: [8 ביוני,‏ 2024,‏ 12:46pm UTC](https://meta.discourse.org/t/access-membership-of-non-visible-groups-via-api/33606/4 "2024-06-08T12:46:04Z")

</div>

This topic was automatically closed after 3181 days. New replies are no longer allowed.
