# Enabling SMS on user account via API

**URL:** <https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308>\
**Category:** API and Webhooks\
**Created:** [February 14, 2022, 10:26pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308 "2022-02-14T22:26:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton.dobschensky](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anton.dobschensky](https://devforum.zoom.us/u/anton.dobschensky)\
**Post date:** [February 14, 2022, 10:26pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/1 "2022-02-14T22:26:13Z")

</div>

**Description**  
I am trying to script out creating a user account and I’m getting stuck on enabling SMS (the option you find in Admin \> Phone System Management \> Users & Rooms \> UserEmail \> Policy). We have SMS enabled on the company so via the GUI I can just toggle SMS on. Below is the API I’m trying to run.

$userProfileBody =@{  
“policy” = @{  
“sms” = @{  
“enable” = $True;  
“international\_sms” = $False  
}  
}  
} | ConvertTo-Json

$summaryUri = $baseUri + “/phone/users/$userID”  
$summaryResponse = Invoke-RestMethod -Method Patch -Uri $summaryUri -ContentType application/json -Headers $requestHeader -Body $userProfileBody

**Error**  
Invoke-RestMethod : {“code”:400,“message”:“Could not modify SMS and International SMS at the same time”}

If I remove the “international\_sms” setting from the policy block I instead get this error:  
Invoke-RestMethod : {“code”:400,“message”:“International SMS is blocked by Admin.”}

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

**Which Endpoint/s?**  
[https://api.zoom.us/v2/phone/users/{userId}](https://api.zoom.us/v2/phone/users/%7BuserId%7D)

---

<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:** [February 15, 2022, 7:05pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/2 "2022-02-15T19:05:04Z")

</div>

Hi @anton.dobschensky

Thanks for reaching out to the Zoom Developer Forum and welcome to our community! I am happy you are here! I will go ahead and try to replicate this issue on my side.  
Could you please confirm if you are calling the Update user’s profile endpoint?  
[https://marketplace.zoom.us/docs/api-reference/phone/methods#operation/updateUserProfile](https://marketplace.zoom.us/docs/api-reference/phone/methods#operation/updateUserProfile)

Best,  
Elisa

---

<div class="post-metadata">

**Author:** ![anton.dobschensky](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anton.dobschensky](https://devforum.zoom.us/u/anton.dobschensky)\
**Post date:** [February 15, 2022, 7:12pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/3 "2022-02-15T19:12:26Z")

</div>

Hi Elisa,

Yes, that is what I’m using. In the web’s documentation it mentions the 400 errors I’m getting, I just can’t seem to find a way around it using the API. It is only the SMS I’m having trouble with. {policy: SMS: {enable: True, international\_sms: false}}

---

<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:** [February 18, 2022, 7:10pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/4 "2022-02-18T19:10:56Z")

</div>

Hi @anton.dobschensky  
I was able to replicate this issue on my side.  
I am trying to figure out how to fix this or how to come up with a workaround.  
Can you please try and go to your account settings and enable SMS

Thanks  
Elisa

---

<div class="post-metadata">

**Author:** ![anton.dobschensky](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anton.dobschensky](https://devforum.zoom.us/u/anton.dobschensky)\
**Post date:** [February 18, 2022, 9:28pm UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/5 "2022-02-18T21:28:01Z")

</div>

If you meant in Company Info \> Account Settings \> Policy, then SMS is enabled there (Allow International SMS is not which is correct for our use). This doesn’t seem to default Users to enabled as we originally thought it might.

In Users & Rooms \> [user] \> Policy, I am able to toggle on SMS, so it does work through the web interface. We’re looking to not need to go in here to manually enable it on everyone we onboard.

---

<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:** [March 21, 2022, 7:28am UTC](https://devforum.zoom.us/t/enabling-sms-on-user-account-via-api/64308/6 "2022-03-21T07:28:07Z")

</div>

Closed on March 21, 2022, 7:28am UTC

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