# Enable/assign a zoom phone to a user | API Call

**URL:** <https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444>\
**Category:** API and Webhooks\
**Created:** [October 5, 2021, 11:04pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444 "2021-10-05T23:04:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan.grijalva](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juan.grijalva/32/12423_2.png) [@juan.grijalva](https://devforum.zoom.us/u/juan.grijalva)\
**Post date:** [October 5, 2021, 11:04pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/1 "2021-10-05T23:04:40Z")

</div>

Hello team,

We are trying to assign a extension number to a user using the Zoom API

api-reference/zoom-api/users/usercreate

We are getting error: “The remote server returned an error: (400) .”

We require your help to check if we are missing something or if this is not the correct way to do it.

Below you can find our code, thank you.

string type\_url = “[https://api.zoom.us/v2/users](https://api.zoom.us/v2/users)”;

string body = “{“action”:“ssoCreate”,“user\_info”:[{“[email":"admin\_amsd@flex.com](mailto:email%22:%22admin_amsd@flex.com)”,“type”:99,“first\_name”:“Admin”,“last\_name”:“amsd”}]}”;

var result = (Api\_with\_body(type\_url, body, “POST”));

This is for a SSO user

Thank you!

Best Regards

Juan Grijalva

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 6, 2021, 8:42pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/2 "2021-10-06T20:42:16Z")

</div>

Hi @juan.grijalva ,

Happy to help! To clarify, are you trying to create a new user with an assigned extension number, or update a pre-existing user’s info with an extension number?

Thank you,  
Gianni

---

<div class="post-metadata">

**Author:** ![juan.grijalva](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juan.grijalva/32/12423_2.png) [@juan.grijalva](https://devforum.zoom.us/u/juan.grijalva)\
**Post date:** [October 6, 2021, 9:06pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/3 "2021-10-06T21:06:48Z")

</div>

Hello Gianni

Hope you are doing well

We use SSO in our environment, we are doing the migration to Zoom Phone from another platform

The thing is that when a user have never used before Zoom Meetings we can not create the Zoom Phone extension for the user

We are looking to prepend SSO users so we can create Zoom Phone extensions for them with API

Instead of waiting for the user to log in to [flex.zoom.us](http://flex.zoom.us) or login to their zoom meetings application

Thank you

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 6, 2021, 9:45pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/4 "2021-10-06T21:45:10Z")

</div>

Hi @juan.grijalva ,

So this sounds like pre-existing users. Please correct me if I am misunderstanding.

You should be able to use this endpoint by passing the user’s accountId to assign a phone number and extension [https://marketplace.zoom.us/docs/api-reference/zoom-phone-api/phone/setupaccount](https://marketplace.zoom.us/docs/api-reference/zoom-phone-api/phone/setupaccount)

Please let me know how this works 🙂

---

<div class="post-metadata">

**Author:** ![juan.grijalva](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juan.grijalva/32/12423_2.png) [@juan.grijalva](https://devforum.zoom.us/u/juan.grijalva)\
**Post date:** [October 6, 2021, 10:05pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/5 "2021-10-06T22:05:25Z")

</div>

So the Phone part we have it covered, as currently we can assign extensions to existing users

The issue is when the user doesn’t exist

How can we create SSO users with APIs?

[@Edgar Corona](mailto:edgar.corona@flex.com) [@Nur Adha Tahir](mailto:NurAdha.Tahir@flex.com)

Please help here as you are they experts on this 😊

Thank you

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 6, 2021, 10:11pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/6 "2021-10-06T22:11:10Z")

</div>

Oh I see! This support article lays out a few options for you to create SSO users, including via API: [https://support.zoom.us/hc/en-us/articles/115005479743-SSO-Pre-provisioning](https://support.zoom.us/hc/en-us/articles/115005479743-SSO-Pre-provisioning)

---

<div class="post-metadata">

**Author:** ![juan.grijalva](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juan.grijalva/32/12423_2.png) [@juan.grijalva](https://devforum.zoom.us/u/juan.grijalva)\
**Post date:** [October 6, 2021, 10:27pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/7 "2021-10-06T22:27:15Z")

</div>

Yes, this command as parameter expect that the user is already on zoom (see below image 1) so is not fulfilling the objective. We need this one [Create users - Users - Zoom API - API Reference - Zoom Developer - Technical Documentation and Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate) with SSOCreate, we have try all parameters but still is not working (image 2)

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 6, 2021, 10:34pm UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/8 "2021-10-06T22:34:55Z")

</div>

Hi @juan.grijalva ,

The images did not attach, but please send them along with your full requests and responses to [developersupport@zoom.us](mailto:developersupport@zoom.us). Please link this thread and address the message to me.

Talk soon,  
Gianni

---

<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:** [November 6, 2021, 8:35am UTC](https://devforum.zoom.us/t/enable-assign-a-zoom-phone-to-a-user-api-call/58444/9 "2021-11-06T08:35:09Z")

</div>

Closed on November 6, 2021, 8:35am UTC

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