# I wonder how to add hundreds of users into a group? Is there any api?

**URL:** https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488
**Category:** Support
**Created:** [July 30, 2022, 7:27am UTC](https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488 "2022-07-30T07:27:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alienazk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alienazk/32/261130_2.png) [@Alienazk](https://meta.discourse.org/u/Alienazk)
#### Post date: [July 30, 2022, 7:27am UTC](https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488/1 "2022-07-30T07:27:14Z")

</div>

I need to add hundreds of users (who have posted in in a specific topic）to a group.  
How could I achieve it？

Thank you very much！

---

<div class="post-metadata">

### Author: ![jessii](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jessii/32/354015_2.png) [@jessii](https://meta.discourse.org/u/jessii)
#### Post date: [July 31, 2022, 7:18pm UTC](https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488/2 "2022-07-31T19:18:48Z")

</div>

Hey @Alienazk – I think I found a easy way that could help you add users to a group. It’s based off the information from this post ([Bulk add all users to group from a trust level? - #6 by jomaxro](https://meta.discourse.org/t/bulk-add-all-users-to-group-from-a-trust-level/68544/6)). Here are the steps I took since it appears to be a little different:

1. Go to the hamburger menu and click Admin \> Users \> Export (You can export any of the active, new, staff, etc.)
2. Once the export is done you should get a system notification with the .csv file in a zip folder
3. On Excel or Google Spreadsheets import the file
4. Once the file opens up go to the user column and depending on the OS either (Windows) left click + shift or (iOS) left click + command to select the usernames you’d like and copy them
5. Go to the Admin \> Users \> Group \> + New Group
6. Under ‘Members’ paste the copied usernames. They should separate automatically!

Here is a video too of how it looks after I’ve copied them from the .csv file:

---

<div class="post-metadata">

### Author: ![Alienazk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alienazk/32/261130_2.png) [@Alienazk](https://meta.discourse.org/u/Alienazk)
#### Post date: [August 1, 2022, 12:13pm UTC](https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488/3 "2022-08-01T12:13:16Z")

</div>

Thank you! It sounds good.  
Finally I chose to export the topic and then do something with the json file.

> [@Move topics from one Discourse instance to another](https://meta.discourse.org/t/topic-and-category-export-import/38930):
>
> Need to move some stuff from one instance of Discourse to another? There is a command line tool to export a topic, a set of topics, or an entire category, and another to import them in at the other end. Topic Export/Import one or more topics and their replies the users who posted in the topic Category Export/Import the category and all its subcategories its security settings custom groups mentioned in the security settingswarning if any of the groups have ‘membership requests’ enable…

---

<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: [August 31, 2022, 12:13pm UTC](https://meta.discourse.org/t/i-wonder-how-to-add-hundreds-of-users-into-a-group-is-there-any-api/234488/4 "2022-08-31T12:13:53Z")

</div>

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