# Zoom Phone API Test Fail Error using Server-to-Server OAuth App

**URL:** <https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946>\
**Category:** Phone\
**Created:** [June 27, 2023, 2:31pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946 "2023-06-27T14:31:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tabryant](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tabryant](https://devforum.zoom.us/u/tabryant)\
**Post date:** [June 27, 2023, 2:31pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/1 "2023-06-27T14:31:40Z")

</div>

Error code: {code":2031, “message”: “Zoom Phone has not been enabled for this account.”}

Using JWT Token works without error and runs on a previous tenant without incident with deprecation rebuilding in our new Zoom tenant using Server-to Server OAuth App above error occurs using Get Call logs, and Get call logs detail

We need to get this fixed asap before the scheduled migration this Thursday at 7p EST.  
All assistance very much needed and greatly appreciated.

---

<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:** [June 27, 2023, 6:25pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/2 "2023-06-27T18:25:42Z")

</div>

Hi @tabryant  
Thanks for reaching out to the Zoom Developer Forum and welcome to our community, I am happy to help here!

Can you please confirm that you are generating the access token correctly and that you have the right scopes added to your application?

---

<div class="post-metadata">

**Author:** ![tabryant](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tabryant](https://devforum.zoom.us/u/tabryant)\
**Post date:** [June 27, 2023, 9:09pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/3 "2023-06-27T21:09:42Z")

</div>

Is there documentation on this to confirm with?

---

<div class="post-metadata">

**Author:** ![tabryant](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tabryant](https://devforum.zoom.us/u/tabryant)\
**Post date:** [June 27, 2023, 9:34pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/4 "2023-06-27T21:34:08Z")

</div>

We can confirm the scopes are correct, but any documentation you have to assist would still be most helpful. Thanks!

---

<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:** [June 28, 2023, 3:59pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/5 "2023-06-28T15:59:58Z")

</div>

Sure! @tabryant  
Here is the link to our Docs on Acces token generation:

> **[Server-to-Server OAuth](https://developers.zoom.us/docs/internal-apps/s2s-oauth/#use-account-credentials-to-get-an-access-token)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![tabryant](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tabryant](https://devforum.zoom.us/u/tabryant)\
**Post date:** [June 28, 2023, 6:11pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/6 "2023-06-28T18:11:06Z")

</div>

Perfect, thank you. We have found the issue to be the way the the API was set up to authenticate using client vs. account. Using account\_credentials resolved it.  
Thanks again for your help!

---

<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 5, 2023, 2:45pm UTC](https://devforum.zoom.us/t/zoom-phone-api-test-fail-error-using-server-to-server-oauth-app/90946/7 "2023-07-05T14:45:13Z")

</div>

@tabryant  
Happy to hear that helped!
