Skip to main content

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

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);

 


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

 


Reply