# Account does not enabled REST API or Invalid access token Erros

**URL:** <https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [January 19, 2023, 7:26pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752 "2023-01-19T19:26:45Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 19, 2023, 7:26pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/1 "2023-01-19T19:26:45Z")

</div>

I want to use the Zoom Meetings API to fetch the report that returns the details of who have attended a one particular meeting, the meeting is also recurring

I tried creating an OAuth Server to Server Application as jwt will be deprecated on June or July 2023.

I provided the client id and client secret with the grant type of client credentials in my python script that did generate the access token, but when I try calling

the meeting end point to get the report I am facing two issues either I get this error

{

“code”: 200,

“message”: “Account does not enabled REST API.”

}

or when I try to pass the access token as authorization header in Postman I get this error

{

“code”: 124,

“message”: “Invalid access token.”

}

I tried these endpoints

[https://api.zoom.us/v2/metrics/meetings/{meeting\_ID}/report](https://api.zoom.us/v2/metrics/meetings/%7Bmeeting_ID%7D/report)

but still the same result

The user id and meeting is correct I applied the developer role to the user ID hence able to create the OAuth Server to Server Application but still facing the same issue

The ID in use is licensed and not a free account.

Not sure if this is the case but said that it is needed to enable rest API from the feature setting, but the admin account is not able to find this option anywhere.

Again, I do not want to integrate this with a 3rd party service or anything complex what I need to mainly is to get one recurring meeting report daily.

Posting my script here from GitHub.

> <https://github.com/Crimson-Zero/Zoom-API-Script/blob/main/main.py>

---

<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:** [January 20, 2023, 6:15pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/2 "2023-01-20T18:15:19Z")

</div>

Hi @wajeeh.rehman

Thanks for reaching out to the Zoom Developer Forum and welcome to our community!  
By taking a look at the code snippet you shared with us, it looks like you are passing the wrong grant\_type.

To request an access token using [Server to Server OAuth credentials](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token), the grant\_type in the request must be “account\_credentials” , this could be the reason why your request to retrieve meetings is failing.

Also, here is a post on How to user Server to Server Oauth app with Postman, that also walks you through the settings needed to be able to use this app type:

> [@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:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 23, 2023, 10:05pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/4 "2023-01-23T22:05:09Z")

</div>

Hello I have updated my code as below and I still getting the access tokken but despite that I am getting the error

{  
“code”: 124,  
“message”: “Invalid access token.”  
}

My Updated Code;

import requests  
import json  
import base64

# Replace with your Zoom OAuth client ID and secret

client\_id = “cl”  
client\_secret = “cs”  
Account\_ID = “AI”

# Replace with the ID of the meeting you want to get the report for

meeting\_id = “meeting iD”

# Get access token

data = {  
“grant\_type”: “account\_credentials”,  
“account\_id”: Account\_ID,  
}

# Request headers

headers = {  
“Host”:“[zoom.us](http://zoom.us)”,  
“Authorization”: “Basic” + base64.b64encode((client\_id + “:” + client\_secret).encode()).decode()  
}

response = requests.post(“[https://zoom.us/oauth/token”](https://zoom.us/oauth/token%E2%80%9D), data=data,headers=headers)  
print(response)  
access\_token = response.json()  
print(access\_token)

# API endpoint for getting the report of a specific meeting

new\_headers = {  
“access\_token” : access\_token}

# API endpoint for getting the report of a specific meeting

url = f"[https://api.zoom.us/v2/report/users/{Account\_ID}/meetings](https://api.zoom.us/v2/report/users/%7BAccount_ID%7D/meetings)"  
url2 = f"[https://api.zoom.us/v2/metrics/meetings/{meeting\_id\_long}](https://api.zoom.us/v2/metrics/meetings/%7Bmeeting_id_long%7D)"

# Send GET request

response2 = requests.get(url2,headers=new\_headers)  
print(response2)

# Print the report

print(json.dumps(response2.json(), indent=4))

---

<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:** [January 23, 2023, 10:10pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/5 "2023-01-23T22:10:53Z")

</div>

Hi @wajeeh.rehman  
It looks like when you are calling the report endpoint, you are passing the account \_id, have you tried passing the userID or the parameter “me”

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 3:57pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/6 "2023-01-24T15:57:21Z")

</div>

if i use this endpoint  
url = f"[https://api.zoom.us/v2/me/](https://api.zoom.us/v2/me/)  
I am getting a 200 response but no data  
even without passing the access token

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 5:22pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/7 "2023-01-24T17:22:36Z")

</div>

I am also getting this error  
{

```
"code": 3001,

"message": "Meeting does not exist: Meeting_ID."

```

}

I verified that the meetings are present I have checked with multiple meetings even those that are ended and those are recurring

---

<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:** [January 24, 2023, 5:41pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/8 "2023-01-24T17:41:23Z")

</div>

Hi @wajeeh.rehman  
This is not a valid endpoint “url = f"[https://api.zoom.us/v2/me/](https://api.zoom.us/v2/me/)”

What I meant is calling the endpoint like this:  
[https://api.zoom.us/v2/report/users/me/meetings](https://api.zoom.us/v2/report/users/me/meetings)

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 5:47pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/9 "2023-01-24T17:47:59Z")

</div>

{“code”:1001,“message”:“User does not exist: me.”}

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 5:50pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/10 "2023-01-24T17:50:53Z")

</div>

Please ignore the above I think I am finally able to get it to work  
WIll post if I get any other issue

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 8:14pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/11 "2023-01-24T20:14:00Z")

</div>

Okay so for this endpoint  
url2 = “[https://api.zoom.us/v2/report/users/user\_id/meetings](https://api.zoom.us/v2/report/users/user_id/meetings)”

I am able to get the summary of the meetings that are held against the account

but when I want to get the participant details using this endpoint

“[https://api.zoom.us/v2/metrics/meetings/{meeting\_id}/participants](https://api.zoom.us/v2/metrics/meetings/%7Bmeeting_id%7D/participants)”

I get

{“code”:3001,“message”:“Meeting does not exist: Meeting\_ID.”}

The meeting ID is correct also I would like to add that the meeting in question is recurring

---

<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:** [January 24, 2023, 9:55pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/12 "2023-01-24T21:55:40Z")

</div>

@wajeeh.rehman  
Make sure that the meeting is in the past, future meetings can not be used with report endpoints

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 24, 2023, 10:02pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/13 "2023-01-24T22:02:03Z")

</div>

But even if I tried with a meeting that has ended though I get a 200 response code I am not getting any returned JSON data

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 25, 2023, 10:46pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/14 "2023-01-25T22:46:58Z")

</div>

Also I checked my roles option and I am not able to find a way to add the scopes for meeting:read and meeting:write but only for Dashboards and reports

---

<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:** [January 26, 2023, 9:47pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/15 "2023-01-26T21:47:20Z")

</div>

@wajeeh.rehman  
Have you been able to follow this guide?

> [@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…

---

<div class="post-metadata">

**Author:** ![wajeeh.rehman](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wajeeh.rehman](https://devforum.zoom.us/u/wajeeh.rehman)\
**Post date:** [January 26, 2023, 10:28pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/16 "2023-01-26T22:28:46Z")

</div>

Yes I did follow the guide.  
I am finally able to make it work

---

<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:** [January 27, 2023, 3:32pm UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/17 "2023-01-27T15:32:07Z")

</div>

Great news!!! @wajeeh.rehman  
Feel free to reach out to us in the future if you need anything else 🙂  
Best,  
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:** [January 31, 2024, 7:08am UTC](https://devforum.zoom.us/t/account-does-not-enabled-rest-api-or-invalid-access-token-erros/81752/18 "2024-01-31T07:08:16Z")

</div>

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