This API endpoint is not recognized - Phone Call Logs

Hello, tried using PowerShell and python but keep getting the same error when I attempt to gather call logs from our account. Failed to fetch call logs. Error: {“code”:2300,“message”:“This API endpoint is not recognized.”}

I am not sure what I am missing here as I am grabbing the Client ID and Client Secret from the app and punching them into the scripts. I created an OAuth and a Sever-to-Server OAuth and then used those Client ID and Secret but no luck.

Below is my PowerShell script I tried but no luck. I also created a Python script, but it gets the same error. Am I gathering the wrong information for the API endpoint not to work?

Set your Zoom API Key and Secret

$apiKey = “Client ID”
$apiSecret = “Client Secert”

Generate the timestamp for the previous day

$previousDay = (Get-Date).AddDays(-1).ToString(“yyyy-MM-dd”)

Base URL for the Zoom API

$baseUrl = “https://api.zoom.us/v2/

Endpoint for fetching call logs

$endpoint = “${baseUrl}report/call_logs?from=$previousDay”

Create Authorization header with Basic authentication using API Key and Secret

$basicAuth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(“${apiKey}:${apiSecret}”))
$headers = @{
“Authorization” = “Basic $basicAuth”
}

try {
# Make API request to fetch call logs
$response = Invoke-RestMethod -Uri $endpoint -Headers $headers -Method Get

# Check if the request was successful
if ($response) {
    Write-Output $response
} else {
    Write-Error "Failed to fetch call logs."
}

} catch {
Write-Error “Failed to fetch call logs. Error: $_”
}

Hi @dbernier
Thanks for reaching out to us
It looks like you are trying to access an endpoint that does not exist.
we do not have an endpoint with the structure you are sharing

https://api.zoom.us/v2/report/call_logs

Please double check your endpoint and if you have a link to our Docs for the endpoint you are trying to access, share it with me so I can take a look
Cheers,
Elisa

Thank you Elisa that makes sense.

I first created the apps from the screenshot previously provided. I created them because they all result in error.

2300
This API endpoint is not recognized.

I used the Client Code and Client Secret from these apps and no luck.

I just did a get for /phone/call_history?page_size=30&from=2020-10-31&to=2021-12-31&next_page_token=BJLYC6PABbAHdjwSkGVQeeR6B1juwHqj3G2&keyword=User%201&department=Phone%20department&cost_center=Phone%20cost%20center

And still no luck. Any resources on how to gather call logs from API would be helpful.

Hi @dbernier
Feel free to use this post as a guide to make request to generate access tokens using a Server to Server Oauth app