# Create a User with the Zoom API and assign the Pending User to a User Group

**URL:** <https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785>\
**Category:** API and Webhooks\
**Created:** [June 30, 2020, 4:00pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785 "2020-06-30T16:00:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![besteman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/besteman/32/8957_2.png) [@besteman](https://devforum.zoom.us/u/besteman)\
**Post date:** [June 30, 2020, 4:00pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/1 "2020-06-30T16:00:04Z")

</div>

**Description**  
Create a User with the Zoom API and assign the Create a User to a User Group. Is it possible to Create a User and Assign the Pending User to a group with the API endpoints?

**Error**  
When we use the Zoom API to Create a User, then we are making a call to add the User to a User Group. When the User confirms the invite, the User is not placed into the User Group. From the Add Group Members we receive a 201 so it looks good, but does not happen or show in the GUI.

The Response we receive from Zoom is in the yellow box:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/6988fdd7bdde8d3e2610f7c9e413dc2736f6d6c7.png)  
As you can see the ids is empty.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**

> **[Create Users - Users - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate)**
>
> A Zoom account can have one or more users. Use this API to add a new user to your account.
> Prerequisites:
> 
> Pro or higher plan
> Scopes: user:write:admin u...

> **[Add Group Members - Groups - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate)**
>
> Add members to a group under your account.
> 
> Prerequisite: Pro, Business, or Education account
> Scopes: group:write:admin
> 
> Rate Limit Label: Medium
> 
> Auth...

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
Add Group Member Payload

```javascript
{
   "members":[
      {
         "id":"",
         "email":null
      }
   ]
}

```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 1, 2020, 11:57pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/2 "2020-07-01T23:57:51Z")

</div>

Hey @besteman,

Once the user confirms their email, they should show up in the group. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![besteman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/besteman/32/8957_2.png) [@besteman](https://devforum.zoom.us/u/besteman)\
**Post date:** [July 2, 2020, 2:24am UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/3 "2020-07-02T02:24:35Z")

</div>

@tommy

Here is the code:

```auto
from dotenv import load_dotenv, find_dotenv
from time import time
import json
import jwt
import requests
import os

load_dotenv(find_dotenv())

def generate_token():
    token = jwt.encode(
        # Create a payload of the token containing API Key & exp time
        {"iss": os.getenv('api_key'), "exp": time() + 5000},
        # Secret used to generate token signature
        os.getenv('api_secret'),
        # Specify the hashing alg
        algorithm="HS256"
        # Converts token to utf-8
    ).decode("utf-8")

    return token

jwt_token = generate_token()

print(jwt_token)
print(time() + 5000)

headers = {
'authorization': f"Bearer {jwt_token}",
'content-type': "application/json"
}

payload = {
  'action': 'create',
  "user_info": {
    "email": "test@gmail.com",
    "type": 1,
    "first_name": "Justin",
    "last_name": "Test"
  }
}

request = requests.post("https://api.zoom.us/v2/users", headers=headers, json=payload)

print(request.status_code)

payload_group = {
  "members": [
    {
      "email": "test@gmail.com"
    }
  ]
}

request_group = requests.post('https://api.zoom.us/v2/groups//members', headers=headers, json=payload_group)

print(request_group.url)

print(request_group.json())

```

Both post requests return a 201 showing that it was successful.

The response from the second post is this

```javascript
{'ids': '', 'added_at': '2020-07-02T02:19:47Z'}

```

After I accept the invite, the user is not placed into the group

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 6, 2020, 7:46pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/4 "2020-07-06T19:46:28Z")

</div>

Hey @besteman,

Okay, I will see if this is intended functionality with the API or a bug. (ZOOM-175614)

In the meantime, you could use the [User Invitation Accepted Webhook](https://marketplace.zoom.us/docs/api-reference/webhook-reference/user-events/user-invitation-accepted) to set off a task in your backend that then calls the [Add Group Member API.](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![besteman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/besteman/32/8957_2.png) [@besteman](https://devforum.zoom.us/u/besteman)\
**Post date:** [July 24, 2020, 4:52pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/5 "2020-07-24T16:52:04Z")

</div>

@tommy  
Is there any update on this one?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 28, 2020, 10:29pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/6 "2020-07-28T22:29:57Z")

</div>

Hey @besteman,

No update yet. It is in the queue to be fixed.

Thanks for your patience.

-Tommy

---

<div class="post-metadata">

**Author:** ![yse0893](https://avatars.discourse-cdn.com/v4/letter/y/43a26b/32.png) [@yse0893](https://devforum.zoom.us/u/yse0893)\
**Post date:** [August 3, 2020, 3:31pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/7 "2020-08-03T15:31:57Z")

</div>

Nice to meet you. Tommy.  
The same phenomenon is occurring for IMGroup, so please check it.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 4, 2020, 6:51pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/8 "2020-08-04T18:51:43Z")

</div>

Hey @yse0893,

Can you please create a new topic and fill out the post template so we have enough info to help? 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 21, 2020, 3:51pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/9 "2020-09-21T15:51:39Z")

</div>

Hey @besteman,

This will be fixed in a release in October. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![besteman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/besteman/32/8957_2.png) [@besteman](https://devforum.zoom.us/u/besteman)\
**Post date:** [October 2, 2020, 5:03pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/10 "2020-10-02T17:03:12Z")

</div>

@tommy  
Awesome to hear!

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 5, 2020, 3:12pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/11 "2020-10-05T15:12:19Z")

</div>

@besteman — glad we could help. Stay tuned to our [Changelog](https://marketplace.zoom.us/docs/guides/stay-up-to-date/changelog)!

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://devforum.zoom.us/u/Andreas)\
**Post date:** [January 28, 2021, 9:07am UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/12 "2021-01-28T09:07:22Z")

</div>

Hello,  
I have the same problem.Panding user I can not assign groups and IM groups.  
Panding user I can not assign groups and IM groups.

I have tested the two options:  
[https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate)  
[https://marketplace.zoom.us/docs/api-reference/zoom-api/im-groups/imgroupmemberscreate](https://marketplace.zoom.us/docs/api-reference/zoom-api/im-groups/imgroupmemberscreate)

As answer I get string(44) “{“ids”:”", “added\_at”: “2021-01-28T07:50:04Z”}"  
But the user is not in the group .

When creating a new user, it is not possible to pass groups or IM groups: [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate)

Does anyone have an example of how I can create a user that is in an IM group and group inside?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [January 29, 2021, 1:50am UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/13 "2021-01-29T01:50:06Z")

</div>

Hey @Andreas,

Thank you for reaching out to the Zoom Developer Forum. If the user is still pending, please try using the `group_id` field of the [Update a User API](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate).

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

I hope that helps!

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![hdogan1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hdogan1/32/22977_2.png) [@hdogan1](https://devforum.zoom.us/u/hdogan1)\
**Post date:** [February 11, 2021, 2:31pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/14 "2021-02-11T14:31:04Z")

</div>

It’s (Update a User API) not working as expected. We’re getting 404 error with the code 1001 for pending users.

```auto
{"code":1001,"message":"User does not exist:."}
```

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [February 12, 2021, 3:57pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/15 "2021-02-12T15:57:23Z")

</div>

Hi @hdogan1,

Can you confirm that the user in question has activated their Zoom account? They will remain pending until they click the link in the verification email sent to their email address.

Let me know if this might be the case—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![Emanuel\_Aguirre](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Emanuel\_Aguirre](https://devforum.zoom.us/u/Emanuel_Aguirre)\
**Post date:** [April 12, 2021, 2:10pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/16 "2021-04-12T14:10:53Z")

</div>

@will.zoom more than six month later and this issue still persists, expected from Zoom as usual, so frustrating.

I can not assign new users to a group.

1. create a new user

2. attempt to add using the addGroupMembers endpoint DOES NOT WORK

3. attempt to add using the updateUser endpoint DOES NOT WORK

**do not ask me for more details. We have reported this several times, DO YOUR OWN TESTS.**

I will be adding this users MANUALLY taking me hours something that should be one in seconds.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 13, 2021, 7:55pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/17 "2021-04-13T19:55:33Z")

</div>

Hey @Emanuel_Aguirre,

I’m sorry to hear that you’re finding problems with the API to be so prevalent. I can assure you that’s not the developer experience we are working to provide. I’happy m to help debug any issues you’re seeing and to make sure any bugs we find are resolved in a timely manner.

I tested this out on my end by following these steps:

1. Create a group using the [Create a Group API](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupcreate)

**POST /groups**

```auto
{
    "name": "Test Group"
}

```

1. Create a `custCreate` user with the [Create a User API](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate)

**POST /users**

```auto
{
  "action": "custCreate",
  "user_info": {
    "email": "newuser@example.fake",
    "type": 1,
    "first_name": "New",
    "last_name": "User"
  }
}

```

1. Add the User to a group using the [Add Group Members API](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate)

**POST /groups/:groupId/members**

```auto
{
    "members": [
        {
            "id": "abcdefghijklmnop1234567",
            "email": "newuser@example.fake"
        }
    ]
}

```

Following those steps, I then navigated to the Zoom Web Portal and saw that this user had been created as was a member of the “Test Group” group.

Are you able to provide ticket numbers or forum posts where you have reported this before? I’ll use the information there to troubleshoot the issue you’re seeing further.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![stefan.norinder](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/stefan.norinder/32/36843_2.png) [@stefan.norinder](https://devforum.zoom.us/u/stefan.norinder)\
**Post date:** [April 13, 2022, 10:30am UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/18 "2022-04-13T10:30:39Z")

</div>

Hi all,

I thought I’d join this party, since I experience the same issues.

Thanks @MaxM for your precise scenario above. I guess this works if you have the `action : custCreate`. The problem however is when you want to add a (pending) user posted with the `action : create` param. Then, as mentioned above, the response to a post against `/groups/ThKDKrkuTbem3VG-xxxx/members` is

```auto
{
    "ids": "",
    "added_at": "2022-04-13T10:16:40Z"
}

```

which indicate that no group id has been set to the user. This is confirmed by the user lacking group belonging after verifying her account.

So the question still remains: is there a way to add a pending user to a group? (Btw, adding `group_id` to the post model doesn’t help.)

---

<div class="post-metadata">

**Author:** ![Shin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shin/32/65029_2.png) [@Shin](https://devforum.zoom.us/u/Shin)\
**Post date:** [November 18, 2024, 1:34pm UTC](https://devforum.zoom.us/t/create-a-user-with-the-zoom-api-and-assign-the-pending-user-to-a-user-group/22785/19 "2024-11-18T13:34:46Z")

</div>

4 years later, the problem still persists, impossible to add a user to a group after using the Create endpoint.

The solution would be to simply add the possibility to include the Group ID as a param while using the Create action…
