# Activating REST API on Account & Laravel Intergration

**URL:** <https://devforum.zoom.us/t/activating-rest-api-on-account-laravel-intergration/83759>\
**Category:** API and Webhooks\
**Created:** [February 27, 2023, 6:48am UTC](https://devforum.zoom.us/t/activating-rest-api-on-account-laravel-intergration/83759 "2023-02-27T06:48:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshuamicallef66](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@joshuamicallef66](https://devforum.zoom.us/u/joshuamicallef66)\
**Post date:** [February 27, 2023, 6:48am UTC](https://devforum.zoom.us/t/activating-rest-api-on-account-laravel-intergration/83759/1 "2023-02-27T06:48:59Z")

</div>

I have created a Server-To-Server OAuth App on Marketplace and linked authenticated the connection in PHP to receive a token. I am then trying to gather information about users to confirm that the API can be called. I recieve the following error.

Client error: `GET https://api.zoom.us/v2/users` resulted in a `400 Bad Request` response: {“code”:200,“message”:“Account does not enabled REST API.”}

I have a Zoom One account, and can not find the way to enable the REST API and gain access to this service.

Code is below:

```auto
 $client = new Client();

        $response = $client->post('https://zoom.us/oauth/token', [
            'form_params' => [
                'grant_type' => 'client_credentials',
                'client_id' => env('ZOOM_CLIENT_ID'),
                'client_secret' => env('ZOOM_CLIENT_SECRET'),
            ],
        ]);

        $accessToken = json_decode($response->getBody()->getContents())->access_token;

        $response2 = $client->get('https://api.zoom.us/v2/users', [
            'headers' => [
                'Authorization' => 'Bearer ' . $accessToken,
                'Content-Type' => 'application/json',
            ],
        ]);

        $users = json_decode($response2->getBody()->getContents())->users;

        return $users;

```

If I return the value of $accessToken, I recieve a token string from the API, so the issue is in the second half.

Does anyone have any ideas? I have tried a few tickets from here but I can not find the setting anywhere.

Also, does anyone have a package or method for interacting with the API in Laravel 9? I am unable to find a package for this and wondering if anyone has any leeds.

Joshua

---

<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 28, 2023, 7:24pm UTC](https://devforum.zoom.us/t/activating-rest-api-on-account-laravel-intergration/83759/2 "2023-02-28T19:24:31Z")

</div>

Hi @joshuamicallef66  
Thanks for reaching out to the Zoom Developer Forum, I am happy to help here!  
It looks like you are passing the wrong grant\_type in your request. The grant\_type should be account\_credentials and you should be passing the account\_id value as well.

Here is a link to a useful guide on how to use Server to Server oauth with Postman

> [@How to user Server-to-Sever OAuth app with Postman](https://devforum.zoom.us/t/how-to-user-server-to-sever-oauth-app-with-postman/70848):
>
> How to use our Server-to-Server OAuth with Postman? As some of you might be aware of, our JWT app is being deprecated by June 2023 and we encourage you to migrate to the newly introduced [Server-to-Server OAuth App](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app) That being said, here is a quick and simple guide on how to use or new app with Postman As stated in our documentation here: This new app type facilitates OAuth-authenticated requests between servers without end-user involvement. And this grant type enable your private server a…

Let me know if this helps,  
Elisa

---

<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 3, 2024, 11:00am UTC](https://devforum.zoom.us/t/activating-rest-api-on-account-laravel-intergration/83759/3 "2024-03-03T11:00:53Z")

</div>

Closed on March 3, 2024, 11:00am UTC

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