API - Create Group scope issue

POST /accounts/{accountId}/groups

Code to call endpoint:

            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.

1 Like

Resolved by using Zoom Meeting API Endpoint: /groups

This then uses the correct scope described above.

1 Like

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