Is there a way to let people sign up to a group?

AI-generated summary

In the Support category, user SaintSal asked if there is a way for users to self-sign up for private groups via a special link, specifically to grant access to conference attendees. mikechristopher responded that this feature does not exist yet but has been requested as an enhancement Group-related enhancements.

When SaintSal inquired about achieving this via the API, Tom_Newsom confirmed it is possible by using the admin API to add or remove users from groups using curl commands with specific JSON endpoints. The discussion also touched on other potential methods, such as adding users during the SSO process dennyv and codinghorror noting that self-joining a group is a logical feature that has been available on the group page since Discourse 1.7 codinghorror.

I have a bunch of private categories, each of which is seen only by members of a specific group for that category. I’d like a way for them to sign themselves up to those groups.

For example, when we run a conference, we want attendees of that event to receive access to a special category for that conference so they can exchange ideas privately.

Is there a way to give members of this group a special link to sign up or add themselves to their group? Not all of these groups have a common email domain. I’d like to give them, forum.com/signup/funevent/ and then when they’re signed up, they’re automatically assigned to that group so they have access.

Or is there another way to achieve this?

Thanks.

not as of yet but has been requested as an enhancement to the groups

Thanks Mike! Think this is doable via the API? I scanned it but didn’t see a way to add a user to a group or vice versa.

Yes it’s possible.

  1. /admin/groups.json will tell you the [group_id] of every group
  2. To add a member to a group
    curl -X PUT -d usernames=username -d api_key=ApiKeyGoesHere -d api_username=ApiUsernameGoesHere https://yoursite.tld/admin/groups/[group_id]/members.json?
  3. To delete a member from a group
    curl -X DELETE -d username=username -d api_key=ApiKeyGoesHere -d api_username=ApiUsernameGoesHere https://yoursite.tld/admin/groups/[group_id]/members.json?

Note that the PUT command accepts a comma separated list, but DELETE is one username at a time

Is there a way to put the user in a group during the SSO process? Any params?

I do think the group page should offer a way to join the group if allowed. It seems like something that should logically be present on that page.

Joining a group via the group page is possible as of Discourse 1.7.