# Groups API - manually syncing group membership?

**URL:** <https://meta.discourse.org/t/groups-api-manually-syncing-group-membership/154521>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [June 11, 2020, 1:15pm UTC](https://meta.discourse.org/t/groups-api-manually-syncing-group-membership/154521 "2020-06-11T13:15:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [June 15, 2020, 4:02pm UTC](https://meta.discourse.org/t/groups-api-manually-syncing-group-membership/154521/6 "2020-06-15T16:02:43Z")

</div>

> [@Judith](#):
>
> I have a membership site (also in Rails) and I’m using the Discourse API in order to automatically create and populate restricted forum groups for all of my user groups. This works great; I’m even giving each group a wiki post to start with. (I’ve [posted my code](https://meta.discourse.org/t/providing-restricted-subforums-for-external-groups/139107).)

I recommend using SSO between your main site and Discourse. That way you get group membership handling for free, and will have a `sync_sso` endpoint to update the membership in a straightforward way.

---

_[View the full topic](https://meta.discourse.org/t/groups-api-manually-syncing-group-membership/154521)._
