Zoom Phone has not been enabled for this account. Python Error

Hi Team,

  1. First I need the endpoint for make call from my zoom number to any number
  2. Second I written the script for getting block list but return error
    {'code': 2031, 'message': 'Zoom Phone has not been enabled for this account.'}

here is my code:

import requests

ZOOM_API_BASE_URL = “https://api.zoom.us/v2
ZOOM_API_KEY = “”
ZOOM_API_SECRET = “”

def get_zoom_access_token():
url = “https://zoom.us/oauth/token

headers = {
    "Content-Type": "application/x-www-form-urlencoded",
}

data = {
    "grant_type": "client_credentials",
    "client_id": ZOOM_API_KEY,
    "client_secret": ZOOM_API_SECRET,
}

response = requests.post(url, headers=headers, data=data)

if response.status_code == 200:
    print(response.json()["access_token"])
    return response.json()["access_token"]
else:
    print(f"Error2: {response.status_code}")
    return None

def initiate_zoom_phone_call(phone_number):
endpoint = “/phone/blocked_list”
url = f"{ZOOM_API_BASE_URL}{endpoint}"

headers = {
    "Authorization": f"Bearer {get_zoom_access_token()}",
    "Content-Type": "application/json",
}
response = requests.get(url, headers=headers)

if response.status_code == 201:
    print("Call initiated successfully!")
    return response.json()
else:
    print(response.json())
    print(f"Error1: {response.status_code}")
    return None

initiate_zoom_phone_call(“recipient_phone_number”)

Hi @pilldrop.ai ,

The way you’re requesting an access token seems to be for JWT app which is not supported. Which app type credentials are you using?

Here is how to do it for OAuth app:

Here is how to do it for Server to Server OAuth app:

Thank you for assisting me. I require the endpoint to initiate a call from my Zoom number to any other number.

Thank you for assisting me. I require the endpoint to initiate a call from my Zoom number to any other number.