# ZoomNet.Utilities.ZoomException: 'Account Does Not Enabled REST API.' - From API

**URL:** <https://devforum.zoom.us/t/zoomnet-utilities-zoomexception-account-does-not-enabled-rest-api-from-api/99453>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [December 4, 2023, 7:03am UTC](https://devforum.zoom.us/t/zoomnet-utilities-zoomexception-account-does-not-enabled-rest-api-from-api/99453 "2023-12-04T07:03:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.seliga](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/a.seliga/32/54264_2.png) [@a.seliga](https://devforum.zoom.us/u/a.seliga)\
**Post date:** [December 4, 2023, 7:03am UTC](https://devforum.zoom.us/t/zoomnet-utilities-zoomexception-account-does-not-enabled-rest-api-from-api/99453/1 "2023-12-04T07:03:28Z")

</div>

We using OAuth server-to-server app. The one used for JWT is not used during sending requests to API because You have switched JWT method on your side (switched off in zoom admin panel). The integration and app has been prepared as You described in the documentation but It doesn’t work. Below Sample payload you use to generate token using your S2S Oauth app:  
Token request  
Url: [https://api.zoom.us/oauth/token](https://api.zoom.us/oauth/token)

Content:  
FormUrlEncodedContent  
Key: ‘grant\_type’, Value: ‘client\_credentials’  
Header Authorization:  
Value: ‘Basic ck1FeEx5Tl9Uc1NvNTNRWGcyVFlUdzpVOWF4MElrWHBrakEwaHBOZDUzeUdWNkRwbVBIVjFJaA==’

Example response:  
{“access\_token”:“eyJzdiI6IjAwMDAwMSIsImFsZyI6IkhTNTEyIiwidiI6IjIuMCIsImtpZCI6IjAxMjZjMmFmLTJkYWItNDczZS1iMzNlLTVlMDE2Y2IyOWIwMSJ9.eyJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJ1aWQiOiJuTmxQMk5tUFMtMmpaTWZhSEg1d3FBIiwidmVyIjo5LCJhdWlkIjoiM2U0ZGJhMWZmZWRlYTU1Y2FkNmZiMDYwYTFjOGE4YmMiLCJuYmYiOjE3MDExNzk4NDMsImlzcyI6InptOmNpZDpyTUV4THlOX1RzU281M1FYZzJUWVR3IiwiZ25vIjowLCJleHAiOjE3MDExODM0NDMsInR5cGUiOjIsImlhdCI6MTcwMTE3OTg0M30.\_v31zjOt0F4u16WP646Px\_4fN4f\_KKzLTgRqfV\_XmaYD24YSKaJf8YnRvH-U9BUnYUzblpVGYXXDk-iVQIdNPQ”,“token\_type”:“bearer”,“expires\_in”:3600,“scope”:“iq\_conversation:read recording:write imchat:userapp recording:read webinar:read webinar\_token:read:live\_streaming iq\_coaching:read iq\_comment:write chat\_channel:write webinar\_token:read:local\_recording user:read user:write meeting:read:sip\_dialing chat\_message:write app:channel\_content:write iq\_deal:read chat\_channel:read chat\_contact:read iq\_conversation:write meeting:write:sip\_dialing user\_info:read webinar:write user\_zak:read iq\_comment:read meeting:write iq\_team:read meeting\_token:read:live\_streaming chat\_message:read meeting:read iq\_playlist:read meeting\_token:read:local\_recording iq\_analytics\_metrics:read”}

- sample api call endpoint you use you encounter the issue

This data is downloaded precisely from the mechanism located in the ZoomNet library, which fulfills the functionality of the zoom API wrapper.  
Code which make this requests is exactly in this file:

> <https://github.com/Jericho/ZoomNet/blob/e1485092a6aba550470c310b6e57c264b4ffe6a4/Source/ZoomNet/Utilities/OAuthTokenHandler.cs#L20>

Setup for this code in C# is:  
public void Call()  
{  
var zoomConnection = OAuthConnectionInfo.ForServerToServer(  
clientId: “OzjbaYegSLOt\_8Eps5KmHg”,  
clientSecret: “C6Gh0wTftJX3j8z3eLXX0S8Ph44PK5lc”,  
accountId: “ibBoqxjMROi7Dy6jzsd-8Q”);

```
        var zoomClient = new ZoomClient(zoomConnection);

        var webinar = await CreateWebinar(
            zoomClient,
            dto.Title,
            dto.Description,
            dto.DateTime,
            dto.EstimatedEndDateTime,
            dto.LecturerEmail,
            dto.ModeratorEmail);
    }

    public async Task<ScheduledWebinar> CreateWebinar(
        ZoomClient zoomClient,
        string title,
        string description,
        DateTime date,
        DateTime estimatedEndTime,
        string lecturerEmail,
        string moderatorEmail)
    {
        var duration = (estimatedEndTime - date).TotalMinutes;

        var password = "";
        while (string.IsNullOrEmpty(password))
        {
            try
            {
                password = "Sample password";
            }
            catch (Exception)
            {
                password = "";
            }
        }

        var scheduledWebinar = await zoomClient.Webinars.CreateScheduledWebinarAsync(
        userId: zoomSettings.UserEmail,
        topic: title,
        agenda: description,
        start: date,
        duration: (int)duration,
        TimeZones.UTC,
        password,
        new ExtendedWebinarSettings
        {
            AlternativeHosts = AlternativeHosts(moderatorEmail),
            AutoRecording = AutoRecordingType.OnCloud,
            StartVideoWhenHostJoins = true,

            ShowSocialShareButtons = false,

            // Video for panelists
            StartVideoWhenPanelistsJoin = true,

            // ??
            EnableHighDefinitionVideo = true,

            HdVideoForAttendees = true,
            AlwaysSendFullHdToAtendees = true,
            PanelistsInvitationEmailNotification = panelistsInvitationEmailNotification,
        });

        if (!string.IsNullOrEmpty(lecturerEmail))
        {
            await AddPanelist(scheduledWebinar.Id.ToString(), lecturerEmail, "Prowadzący");
        }

        return scheduledWebinar;
    }

```

Please recheck this because based on forum threads It is quite often issue and We need to fix it asap because We are losing users. The integration has been prepared as You described in the documentation but It doesn’t work. I have contacted to support before but they told me that everything is fine from their perspective (ticket TS0154291)

---

<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:** [December 4, 2023, 6:49pm UTC](https://devforum.zoom.us/t/zoomnet-utilities-zoomexception-account-does-not-enabled-rest-api-from-api/99453/2 "2023-12-04T18:49:44Z")

</div>

Hi @a.seliga  
Thanks for reaching out to us  
It looks like you are passing the wrong value for grant\_type, it should not be client\_credentials, it has to be account\_credentials

---

<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:** [December 7, 2024, 10:26am UTC](https://devforum.zoom.us/t/zoomnet-utilities-zoomexception-account-does-not-enabled-rest-api-from-api/99453/3 "2024-12-07T10:26:13Z")

</div>

Closed on December 7, 2024, 10:26am UTC

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