Skip to main content
The First Step
Apr 15, 2025 2:54 PM UTC
Solved

Why does the Call Log API Call only show my records

Hi

Using the following code, the results appear only appear to show my call records! Any ideas please?

static private async Task read_user_calllog()
{
    string dateFrom = "2025-03-13T00:00:00.000Z";
    string dateTo = "2025-04-14T09:00:00.000Z";
    string view = "Detailed";
    try
    {
        var queryParams = new ReadUserCallLogParameters();
        queryParams.dateFrom = dateFrom ;
        queryParams.dateTo = dateTo ;
        queryParams.view = view;

        var resp = await restClient.Restapi().Account().Extension().CallLog().List(queryParams);
        foreach (CallLogRecord record in resp.records)
        {
            Console.WriteLine(JsonConvert.SerializeObject(record, Formatting.Indented));
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine("Cannot read user call log data. " + ex.Message);
    }
}

 

Thanks in advance

PhongVu
PhongVuAnswer
Community Manager
Apr 15, 2025 4:28 PM UTC

Because you call the user/extension call log API

var resp = await restClient.Restapi().Account().Extension().CallLog().List(queryParams);

Call the company call log API instead. Make sure the app is authenticated by a super admin user, or a user who has the ReadCompanyCallLog permission.

await restClient.Restapi(apiVersion).Account().CallLog().List(readCompanyCallLogParameters);

 

2 replies

PhongVu
Community Manager
PhongVuAnswer
Community Manager
Apr 15, 2025 4:28 PM UTC

Because you call the user/extension call log API

var resp = await restClient.Restapi().Account().Extension().CallLog().List(queryParams);

Call the company call log API instead. Make sure the app is authenticated by a super admin user, or a user who has the ReadCompanyCallLog permission.

await restClient.Restapi(apiVersion).Account().CallLog().List(readCompanyCallLogParameters);

 

The First Step
Apr 16, 2025 7:23 AM UTC

I’ve only been looking at the API a couple of days so thanks for your assistance, that works great.