Invite users to a group

Discourse
Sun, 11 May 2014 23:46:59 +0000
Site Management

This guide explains how to invite users to a group in your Discourse community, covering both staff and group owner methods.

Required user level: Administrator or Group Owner

Forum staff and group owners can create invites to add new and existing users to groups.

This guide will explain:

How staff and group owners can send invites to users.

Using the Discourse API for user invitations.

Sending bulk invitations via CSV upload.

It is not possible to invite users to predefined groups such as, trust level groups, admin, mod or staff groups. As a work around, you can configure a custom group to automatically set a users trust level in the Effects section of the group’s configuration page. Doing this will allow you to set the trust level of invited users to a trust level other than what is set by your site’s default invitee trust level setting.

Inviting users as staff

Discourse staff can invite both new and existing users to one or more custom groups. Here’s how to do it:

1. Navigate to your profile page.

2. Click on “Invites”.

3. Select the “Add to groups” dropdown to select the groups you want to invite users to.

4. Invites can be saved as a link that can be shared directly with users by clicking “Save Invite”, or sent via email by clicking click “Save and Send Email”.

See Configuring how users can create and send invites for others to join your community for additional details about sending invites.

Inviting users as a group owner

If you’re a group owner, you can invite new users to the group you own. Follow these steps:

1. Go to the group’s page.

2. Click the “Invite” button.

Group owners can also invite existing users to groups using the “Add Users” button.

Using the API

Group invites can also be sent using the Discourse API with the /invites.json API endpoint.

Alternatively, you can use The Discourse API gem to send invites using Ruby.

The following is an API example using the Discourse API Gem:

require 'discourse_api'

client = DiscourseApi::Client.new("https://discourse.example.com")
client.api_key = "your key"
client.api_username = "an_admin"

# Invite user by email to specific groups
client.invite_user(
  email: "bob@bob.com",
  group_ids: "1,2,3"
)

Bulk Invites

Bulk inviting users can be done by uploading a CSV file. For details about this process, read the detailed guide here: Send Bulk User Invites.

Best practices

Create custom groups to organize users based on roles or permissions.

Offer clear instructions in your invitation messages to prevent confusion.

Regularly review and manage group memberships to maintain an organized community.

Additional resources

Discourse API documentation: https://docs.discourse.org/

Last edited by @SaraDev Tuesday, July 9, 2024 8:00 PM UTC
Check document (clicca per ulteriori dettagli)

3 messaggi - 3 partecipanti