# Receiving 1001 User does not exist despite having just received the userID from the API

**URL:** <https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [July 16, 2024, 5:46pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784 "2024-07-16T17:46:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sh\_dev](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sh\_dev](https://devforum.zoom.us/u/sh_dev)\
**Post date:** [July 16, 2024, 5:46pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/1 "2024-07-16T17:46:33Z")

</div>

at Your New Topic as Follows:  
**API Endpoint(s) and/or Zoom API Event(s)**  
Currently attempting to use the Zoom Phone API Assign Calling Plan(POST /phone/users/{userId}/calling\_plans) endpoint

**Description**  
I’m creating an onboarding automation for new users. I create a user with the SCIM2 New User Endpoint(/scim2/Users) which returns the newly created user (including the userID field)  
I then attempt to use the CallingPlan API to assign a plan to the newly created user (using the provided userID from the creation response) but I get the error that the user does not exist. I’ve attempted using the “userName” field (since I know other endpoints accept the userName instead of userID sometimes) and I receive the same result.

**Error?**  
{‘code’: 1001, ‘message’: ‘User does not exist: [REDACTED@EMAIL.COM](mailto:REDACTED@EMAIL.COM).’}  
{‘code’: 1001, ‘message’: ‘User does not exist: REDACTED\_USERID\_FIELD’}

**How To Reproduce**  
_Steps to reproduce the behavior:_  
_1. Request_

- **URL** /v2/phone/users/{user\_id}/calling\_plans
- **HEADERS** {“Host”: “[zoom.us](http://zoom.us)”, Authorization": “Bearer {access\_token}”, “Content-Type”: “application/json”}
- _BODY_\* {“calling\_plans”: [{“type”: plan\_type, “billing\_account\_id”: account\_id}]}  
_2. Authentication method or app type_ I’m using a Bearer Token authentication method with a Server-to-Server private app (from Zoom Market Place) to manage the required scopes

I’ve done some searching and most of the findings related to 1001 seem to be when the userID in question isn’t part of the JWT token’s account or some how not “in scope” however I think this must be different since I create the user in this case so it must be in scope

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 18, 2024, 6:23pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/2 "2024-07-18T18:23:43Z")

</div>

Hi @sh_dev  
Thanks for reaching out to us!  
Have you tried passing down the email of the user? Could you please share with me the request URL you send when you create your users so I can try and replicate this on my end?  
Cheers,  
Elisa

---

<div class="post-metadata">

**Author:** ![sh\_dev](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sh\_dev](https://devforum.zoom.us/u/sh_dev)\
**Post date:** [July 18, 2024, 6:38pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/3 "2024-07-18T18:38:53Z")

</div>

Thanks Elisa!

Sure thing;

My process currently is to create a user via a POST to `api.zoom.us/scim2/Users` endpoint which then returns the user that was created

I then use the returned values and confirm that the user exists with a GET request to the same URI `api.zoom/us/scim2/Users` providing the returned “id” property to confirm that there is a user that was created. (the property looks like this in format \>\> `'id': 'AQbQWREDACTEDCZOjda-PA'`) which does return a single user matching the query so I’m pretty certain the user exists. I’ve also successfully confirmed that doing the same query with the “username” property (which is the user’s email `testingUser@DOMAIN.com`) worked too for the GET request and returned a the same user

Unfortunately, I’ve tried using the “username” property of the returned user (which is their email address in my case) and then I’ve also tried using the “id” property which is a string that appears to match the documentation’s example but return the 1001 error. Is this because the SCIM endpoint cannot create full users but rather stores them somewhere else?

Any recommendations are appreciated!

---

<div class="post-metadata">

**Author:** ![sh\_dev](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sh\_dev](https://devforum.zoom.us/u/sh_dev)\
**Post date:** [July 26, 2024, 4:39pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/4 "2024-07-26T16:39:57Z")

</div>

If anyone else has suggestions I’d love help on this. I’ve still not been able to figure out in the grand scheme of things how I could assign a calling plan (with phone number from our pool) to a newly created user all through API

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 26, 2024, 5:00pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/5 "2024-07-26T17:00:24Z")

</div>

Hey @sh_dev  
Sorry for the late response here!  
Quick question, have you tried assigning the phone plan upon user creation?  
You do have the option to do so using the SCIM endpoint

> **[Zoom SCIM2 API](https://developers.zoom.us/docs/api/rest/reference/scim-api/methods/#operation/userScim2Create)**
>
> API Reference for /docs/api/rest/reference/scim-api/methods

---

<div class="post-metadata">

**Author:** ![sh\_dev](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sh\_dev](https://devforum.zoom.us/u/sh_dev)\
**Post date:** [July 30, 2024, 3:25pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/6 "2024-07-30T15:25:57Z")

</div>

I have tried but maybe I’m not provided the correct info:

I tried using the below body to create a new account however, I cannot seem to get the account to be created as anything other than Zoom Meetings Basic when attempting to check the created account from User Management.

```python
    body = json.dumps({
        "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
        "userName": email,
        "name": {
            "givenName": first_name,
            "familyName": last_name
        },
        "emails": [
            {
                "value": email,
                "primary": True
            }
        ],
        "phoneNumbers": [
            {
                "value": phone_number,
                "type": "work"
            }
        ],
        "urn:ietf:params:scim:schemas:extension:zoom:1.0:User": {
            "zoomPhoneNumber": phone_number,
            "zoomPhoneCallingPlan": "phone_calling_usca_one_year_unlimited",
            "zoomOneBizPlus": "16",
        },
        "active": True
    })

```

Maybe I’m reading the documentation incorrectly. I’ve tried using only “zoomPhoneCallingPlan” then only “zoomOneBizPlus” and then lastly together. The account seems to always be created as Zoom Meetings Basic

It’s possible I’m trying to assign the wrong plan type (and maybe if we don’t own the plan it defaults bac) However, I did a list\_calling\_plans API and it returned with 83200 so I think I’m correct:

```python
 {'type': 83200, 'name': 'Zoom Workplace Business Plus with US/CA Unlimited', 'subscribed': 285, 'assigned': 279, 'available': 6}]}

```

---

<div class="post-metadata">

**Author:** ![sh\_dev](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sh\_dev](https://devforum.zoom.us/u/sh_dev)\
**Post date:** [July 30, 2024, 3:30pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/7 "2024-07-30T15:30:59Z")

</div>

HEY so I think I might have figured out the issue, I was missing a base type for the user “licensed” to tell the API that there is licensing info included in the body otherwise it seems to ignore it.

`"userType": "Licensed",`

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 30, 2024, 5:14pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/8 "2024-07-30T17:14:16Z")

</div>

@sh_dev  
Happy to hear you figured this one out!

---

<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:** [July 31, 2024, 5:14pm UTC](https://devforum.zoom.us/t/receiving-1001-user-does-not-exist-despite-having-just-received-the-userid-from-the-api/113784/9 "2024-07-31T17:14:54Z")

</div>

Closed on July 31, 2024, 5:14pm UTC

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