# How to determine the ID of each group for use with the API?

**URL:** <https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629>\
**Category:** Support\
**Created:** [2016年十一月7日 17:23 UTC](https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629 "2016-11-07T17:23:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)\
**Post date:** [2016年十一月7日 17:23 UTC](https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629/1 "2016-11-07T17:23:49Z")

</div>

Hello all. I’m using the API to set users’ groups and it requires the numerical ID of the group but I can’t seem to find that anywhere.

Thanks very much for any help anyone can provide!

---

<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:** [2016年十一月7日 17:43 UTC](https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629/2 "2016-11-07T17:43:18Z")

</div>

`/admin/groups.json` will give you information on all of the groups.

If you’re doing something with the API, you can probably grok JSON, but this [Chrome JSONview plugin](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en) makes it easier to read.

---

<div class="post-metadata">

**Author:** ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)\
**Post date:** [2016年十一月7日 18:15 UTC](https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629/3 "2016-11-07T18:15:58Z")

</div>

Fantastic. Thanks Jay.

---

<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:** [2022年五月21日 16:43 UTC](https://meta.discourse.org/t/how-to-determine-the-id-of-each-group-for-use-with-the-api/52629/6 "2022-05-21T16:43:48Z")

</div>

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