Account does not enabled REST API

I successfully get token and then make a GET call for a users list. with a token supplied by sucessful oauth token request

def get_user_list(url, authorization_header, status=‘active’, page_size=‘30’):
post_data = {
‘status’:status,
‘page_size’:page_size
}
response = requests.get(
url=url,
headers=authorization_header,
params=post_data
)

However I get a response saying Account does not enabled REST API. I do not see such setting in the account settings.

authorization_header = ‘Authorization’: ‘Bearer ey******’
url = ‘https://api.zoom.us/v2/users

response =

reason: ‘Bad Request’
request: <PreparedRequest [GET]>
status_code: 400
text: ‘{“code”:200,“message”:“Account does not enabled REST API.”}’
url: ‘https://api.zoom.us/v2/users?status=active&page_size=30

any idea on the cause of this.

@jason.bowsher Hope you will be fine.

What type of account is used while authorizing with OAuth?

We get the access token with the following code. (No proxies used). The client ID/Secret and AccountID are the variable values generated in the zoom server to server oauth app registration credentials

def get_access_token(url, client_id, client_secret, account_id, proxy=PROXIES):
response = requests.post(
url,
data={“grant_type”: “client_credentials”, “account_id”:account_id},
auth=(client_id, client_secret),
# proxies=proxy
)
#return response.json()[“access_token”]
return response

I am also got error “Account does not enabled REST API” trying to create meeting via OAuth app in our Pro (Named Host) account.

POST:
https://api.zoom.us/v2/users/[USER_ID_HERE]/meetings

Response:
data: { code: 200, message: ‘Account does not enabled REST API.’ }

Can’t find where is i need to enable this API.

@hellomusic.ru

:point_right: USER_ID_HERE that user is created from API or Account Management?

Actually i tried different variants. Regarding documentation
https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingCreate
“userId – the user ID or email address of the user”
We got only one user on our Pro account, so i tried pass email and account number from /profile page (i want just create meeting in this account)

Nothing works.

In case you mean what type of Zoom account reather than the server to server marketplace app generated account id. The Zoom account is a Business account

1 Like

Hi @jason.bowsher , @hellomusic.ru could you please message me your account ids and confirm what type of licensing you have for your accounts? Thanks!

Found a resolution for this issue. the zoom_api_helper installed via pip works. I think it may be that you need to use the token in the same request session rather than passing it to a newly created session. Would be useful to confirm if this was the issue.

Interesting, thanks for sharing!

By session, do you mean a new separate request? Your access token should work as long as it’s unexpired. This behavior is unexpected.

By session I mean a request.session and in this same instance do the get token and then get function as the token is set in the session.

You can download the zoom_api_helper code from pypi and see this.

Thanks for sharing. I have not tested this helper yet so I appreciate you including your experience here for our developer community.

Gianni, hello! it is me again (earlier i talk with you on account hellomus**.@*.com

For now business team decide to create separate account (i wrote from them right now), its licensed and I create OAuth app and again try to create meeting and again got this error “Account does not enabled REST API”

request is very simple

POST(
https://api.zoom.us/v2/users/me/meetings,
{
agenda: ‘Basic online lesson’,
default_password: false,
duration: 60,
password: ‘1a2s3v4b5b6’,
},
{
headers: {
Authorization: Bearer ${token},
},
}

token created with POST(‘https://zoom.us/oauth/token?grant_type=client_credentials’) passing ZOOM_CLIENT_ID and ZOOM_CLIENT_SECRET from OAuth app

HI @HelloMusicFamily
Please, take a look into our Docs here where you will find valuable information on how to use OAuth with Zoom

https://marketplace.zoom.us/docs/guides/auth/oauth/#step-2-request-access-token

It looks like you are creating the token with client credentials that are tied to Oauth applications.

Are you trying to use a Server-to-Server Oauth app? In that case, you want to use account_credentials

https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token

Hope this helps,
Elisa

Hi, Elisa!
Yes, i used wrong app to create meeting…
Now i create new server-to-server app and all works like a charm!

Thank you!

1 Like

Great news @HelloMusicFamily !!!

Buenas tardes, tengo el mismo problema

  1. cuano utilizo account_credentials para generar un TOKEN, servidor a servidor, me da el error: unsupported grant type
  2. cuando utilizo client_credentials, se genera adecuadamente el TOKEN.
  3. al querer crear un meeting, utilizando el TOKEN generado, da el error: Account does not enabled REST API… qué debo hacer…

Hola @gestionetmultimedia
Muchas gracias por contactarnos! podrías crear un nuevo tema para que podamos apoyarte.
Esta conversación ha sido cerrada

Recien hoy me me tope con este error , efectivamente veo que hay que migrar a authentication to server-to-server OAuth 2.0 , solo quiero agregar que en el apartado de activación en zoom app marketplace , fue posible tener una extensión hasta el 10 de noviembre del 2023.

1 Like

@jchavezb Así es, hay una extensión que será válida hasta el 10 de noviembre, sin embargo te recomiendo comenzar con la migración desde ahora.

1 Like