# API - Create Group scope issue

**URL:** <https://devforum.zoom.us/t/api-create-group-scope-issue/80824>\
**Category:** Users and Groups\
**Tags:** api-requests\
**Created:** [December 28, 2022, 10:03am UTC](https://devforum.zoom.us/t/api-create-group-scope-issue/80824 "2022-12-28T10:03:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/charlr/32/43128_2.png) [@charlr](https://devforum.zoom.us/u/charlr)\
**Post date:** [December 28, 2022, 10:03am UTC](https://devforum.zoom.us/t/api-create-group-scope-issue/80824/1 "2022-12-28T10:03:47Z")

</div>

POST /accounts/{accountId}/groups

Code to call endpoint:

```auto
            ApiHelper ApiHelperObj = new ApiHelper(accessToken);
            ApiHelperObj.InitializeClient();

            string urlParameters = ApiHelperObj.ApiClient.BaseAddress + @"accounts/me/groups";

            string body = @"{
                            ""name"":""Recording Group""
                           }";

            HttpContent content = new StringContent(body, Encoding.UTF8, "application/json");

            using (var response = await ApiHelperObj.ApiClient.PostAsync(urlParameters, content))
            {
                var val = await response.Content.ReadAsStringAsync();
                var valJSON = JsonConvert.DeserializeObject<dynamic>(val);

                if (response.IsSuccessStatusCode)
                {
                    return valJSON.id.ToString();
                }
                else
                {
                    throw new Exception($"There was a problem creating the Recording Group. Error: {valJSON.message}");
                }
            }

```

According to the API documentation, the required scopes are group:write:admin.

```
            "description": "Use this API to create a [group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management). You can add a **maximum** of 100 groups in one account per day, and a maximum of 5000 groups in one account.\n\nIf you enabled a new group via the user interface, you can also choose whether to display the group and set its privacy level.\n\n ****Scopes:** `group:write:admin **`<br>** [Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits): **`Light`\n\n** Prerequisites**: \n* A Pro or higher account",

```

This scope is assigned to my OAuth app.

However I get a 400 Badrequest response back with message:

“{"code":4700,"message":"Invalid access token, does not contain scopes: [group:master, group:write:master]."}”

I do not require any access to sub accounts in my app. The response makes no sense.

If I do add these scopes, I am not able to authorize the app.

And don’t have a setting called “Sub Account management”, I believe because we don’t have sub accounts. This is also problematic as we do not expect users using our app to have sub accounts.

How do I create a group with the documented scopes “group:write:admin” without having scopes “group:master, group:write:master”?

Thank you.

---

<div class="post-metadata">

**Author:** ![charlr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/charlr/32/43128_2.png) [@charlr](https://devforum.zoom.us/u/charlr)\
**Post date:** [December 28, 2022, 12:51pm UTC](https://devforum.zoom.us/t/api-create-group-scope-issue/80824/2 "2022-12-28T12:51:47Z")

</div>

Resolved by using Zoom Meeting API Endpoint: /groups

This then uses the correct scope described above.

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [December 29, 2022, 4:56pm UTC](https://devforum.zoom.us/t/api-create-group-scope-issue/80824/3 "2022-12-29T16:56:54Z")

</div>

Thanks for sharing the solution @charlr , let us know if there’s anything we can help with 🙂
