# Using Group APIs

**URL:** <https://devforum.zoom.us/t/using-group-apis/63505>\
**Category:** API and Webhooks\
**Tags:** faq, guide\
**Created:** [January 31, 2022, 10:25pm UTC](https://devforum.zoom.us/t/using-group-apis/63505 "2022-01-31T22:25:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brandon.zoom/32/29840_2.png) [@Brandon.zoom](https://devforum.zoom.us/u/Brandon.zoom)\
**Post date:** [January 31, 2022, 10:25pm UTC](https://devforum.zoom.us/t/using-group-apis/63505/1 "2022-01-31T22:25:15Z")

</div>

Hello Zoom Developers!

Many Zoom Developers that we support utilize our UI for [Group Management](https://support.zoom.us/hc/en-us/articles/204519819-Managing-user-groups-and-settings). I am writing this walkthrough post in hopes that it sheds some much needed light on our [Groups APIs](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#tag/Groups). Let’s hop right in!

**Getting Started**  
For this walkthrough, you’ll need a Pro or higher account and access to a JWT/OAuth Token to make the relevant api calls (I will be using JWT exclusively).

**Creating a group** :

Let’s [create a group](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/groupCreate) named ‘TEST GROUP’. Using an authorization token, make a POST request to [https://api.zoom.us/v2/groups:](https://api.zoom.us/v2/groups:)

> import requests  
> import json
> 
> url = “[https://api.zoom.us/v2/groups](https://api.zoom.us/v2/groups)”
> 
> payload = json.dumps({  
> “name”: “TEST GROUP”  
> })  
> headers = {  
> ‘Content-Type’: ‘application/json’,  
> ‘Authorization’: ‘Bearer {{JWT TOKEN}}’  
> }
> 
> response = requests.request(“POST”, url, headers=headers, data=payload)
> 
> print(response.text)

Your response should look something like this:

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/f/3fb010d412e4da734e2f1f4af7fd26b64a25d639.png)

You should also now be able to see that the group exists via the [List Groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/groupMembers) api call[a], or in the UI under Admin \> User Management \> Group Management[b].

a.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/5/b5887e62059abf05b4a46201f27d37269b8b5a14.png)

b.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/1/41e88c5fc8260136654d1f9158634d0cade62eed.png)

**Add Group Members**

Now that we have a group, let’s [add a member](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/groupMembersCreate) to it! We’ll want to make a POST request to [https://api.zoom.us/v2/groups/groupID/members](https://api.zoom.us/v2/groups/groupID/members) , where groupID is the id of TEST GROUP we received from our create/list groups response. It should look like the below:

> url = “[https://api.zoom.us/v2/groups/KLIRCCTqRGa0tC7pENFruw/members](https://api.zoom.us/v2/groups/KLIRCCTqRGa0tC7pENFruw/members)”
> 
> payload = json.dumps({  
> “members”: [  
> {  
> “email”: “[brandon.herlong+group\_2\_user@gmail.com](mailto:brandon.herlong+group_2_user@gmail.com)”  
> }  
> ]  
> })  
> headers = {  
> ‘Content-Type’: ‘application/json’,  
> ‘Authorization’: ‘Bearer {{JWT TOKEN}}’  
> }
> 
> response = requests.request(“POST”, url, headers=headers, data=payload)

A successful 201 response should provide the user’s id as well as the time the user was added to the group. Now, upon calling [list groups members](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/groupMembers), we can see that our user has made it to his group!

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/0/b0b9282236816389000ee56df641ee7850f854c4.png)

A couple of things to note here – the user’s type is 1, which points to this user being basic/unlicensed. Also, this is the user’s **[primary group](https://support.zoom.us/hc/en-us/articles/115005269866#:~:text=the%20Engineers%20group.-,Primary%20groups,-If%20a%20user).** Similar to when using the UI, the first group you add a member to via API will default as the user’s primary group. If you want to add a user to a second or third group, and change the user’s primary, you will need to do so via the [Update a group member](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/updateAGroupMember) api.

Now that we’ve gone through the basics of using the Group API, let’s look into a common use case.

Suppose you are an education organization and have teacher, student, and administrator groups. You want your teachers to join meetings with cameras on and unmuted, but leave this optional for students. Or, perhaps you only want teachers to be able to annotate during a meeting. Rather than manage these settings individually for users/per meeting, you now have the option to do this per group, via the [Update locked settings](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods#operation/groupLockedSettings) endpoint. It’s important to note how to [manage conflicts](https://support.zoom.us/hc/en-us/articles/115005269866-Using-tiered-settings#:~:text=this%20option%20completely.%20%C2%A0-,Managing%20conflicting%20settings,-If%20an%20individual) in the event users are in multiple groups.

And that’s group apis in a nutshell! Please feel free to comment any questions you may have, or share any use cases that you’ve come up with to display for other developers!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 3, 2022, 8:25am UTC](https://devforum.zoom.us/t/using-group-apis/63505/2 "2022-03-03T08:25:38Z")

</div>

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