Skip to main content
Solved

Why does the Call Log API Call only show my records

  • April 15, 2025
  • 2 replies
  • 99 views

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

Best answer by PhongVu

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
Forum|alt.badge.img+1
  • Community Manager
  • 2476 replies
  • Answer
  • April 15, 2025

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

 


  • Author
  • New Participant
  • 1 reply
  • April 16, 2025

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