Account does not enabled REST API

Si ya estamos en ello , gracias

1 Like

This still Doesn’t work for me. I am trying to add a user to my account using the API. I have a server-to-server Oauth App and Here’s my code:

from dotenv import load_dotenv, find_dotenv
import requests
import os

# Load environment variables

# Function to generate an OAuth access token
def generate_oauth_token():
    url = ""
    payload = {
        'grant_type': 'client_credentials'
    headers = {
        'Authorization': 'Basic ' + os.getenv('ZOOM_CLIENT_CREDENTIALS')
    response =, headers=headers, data=payload)
    token = response.json().get('access_token', None)
    if not token:
        raise Exception("Failed to retrieve access token")
    return token

# Generate the OAuth token
oauth_token = generate_oauth_token()

# Print the OAuth token

# Set the authorization header with the OAuth token
headers = {
    'Authorization': f"Bearer {oauth_token}",
    'Content-Type': "application/json"

# Payload for creating a new user
payload = {
    'action': 'create',
    "user_info": {
        "email": "",
        "type": 1,
        "first_name": "Justin",
        "last_name": "Test"

# Make the API request to create a new user
response ="", headers=headers, json=payload)

# Print the status code and JSON response

I am doing this from the admin account which is Pro licensed and the app is active as well.
This is the output I get:

{'code': 200, 'message': 'Account does not enabled REST API.'}

Hi @vishruth , there’s many updated threads on this issue and I encourage a search, but from your code I can see you are not generating the S2S OAuth access token correctly. You need account_id as one of the query parameters and have to provide your account_id:[account_id]

1 Like