# Automatically add/remove users to/from a group based on badge id?

**URL:** <https://meta.discourse.org/t/automatically-add-remove-users-to-from-a-group-based-on-badge-id/31431>\
**Category:** Feature\
**Tags:** badges, groups, completed\
**Created:** [25.Июль.2015 21:24:56 UTC](https://meta.discourse.org/t/automatically-add-remove-users-to-from-a-group-based-on-badge-id/31431 "2015-07-25T21:24:56Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mr8](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mr8](https://meta.discourse.org/u/mr8)\
**Post date:** [03.Август.2015 18:25:31 UTC](https://meta.discourse.org/t/automatically-add-remove-users-to-from-a-group-based-on-badge-id/31431/5 "2015-08-03T18:25:31Z")

</div>

Would really be great if this becomes a core feature since plugins seem pretty fragile with updates!

Until then, I’m thinking of maybe doing this via the api - have a script query a badge\_id (`/user_badges.json?badge_id=XX`) every few days and grant/remove users from the group (`PUT`/`DELETE` the user(s) on `/admin/groups/XX/members.json`)..

---

_[View the full topic](https://meta.discourse.org/t/automatically-add-remove-users-to-from-a-group-based-on-badge-id/31431)._
