I am using ringcentral SDK to authenticate and retrieve the call report. I am trying to get the detailed call report from the past six months for all users (I created the sandbox credentials and I am super admin as well), I need both inbound and outbound calls.. Below is a snippet of the code I am using to retrieve the call report, however, when I run my code I encounter that no call records are being retrieved. This is the code I am using:
params = {'view': 'Detailed', 'dateFrom' : start_date, 'dateTo' : date_today, 'perPage' : 1000, 'type' : 'Voice'}
response = platform.get(f'/restapi/v1.0/account/~/extension/~/call-log?view=Detailed', params) status_code = response.response().status_code print('status code', status_code) -> This prints a 200 response which is a successful call.
response_content = response.text()
try:
response_data = response.json_dict()
except json.JSONDecodeError as e:
print(f'failed to parse JSON response:, {e}')
response_data = response.json_dict()
call_records = response_data.get('records', c])
print('call records', call_records)
When I run the code I get an empty list on call_records which means no data is being retrieved. I know the data is there because I can manually download the call report but I am not sure what the error is when retrieving the data using the API.