Skip to main content

Hi Yesterday I created an app using the call log API and I was able to test it using the sandbox environment. I was able to get the app graduated with multiple requests. I Made all the changes in my code to include the credentials for the production environment and I am getting 400 error which make me think there is an issue with the user credentials. I did notice that the production environment is using an extension that is not mine, it belongs to one of our super users. Do I need to use the password for that extension, or can I use the password of my extension to run the script.
Is there any way to change the extension to mine ?

What endpoint do you call, the user call log or the account call log? If you call the account call log endpoint, you must authenticate the app with a super admin user, or a custom user role that include the access account call log user permission.

To make sure that your code works well, just call the user call log with the tilde "~" at the extension id in the path. I.e. "/restapi/v1.0/account/~/extension/~/call-log"


@Phong Vu Thank you for the help , this is the End point im calling:

resp = platform.get('/restapi/v1.0/account/~/extension/~/call-log', params)


Using this end point requires me to authenticate the app with a super admin user right ?


No, this endpoint is for reading the user call log data and the user is the one being authenticated.

Double check the app credentials for production and make sure the username and password is of the user under your production account.

If you still get the 400 status, post the query params so I can have a look at it.


Thank you , I was able to retrieve my call log using my extension and password ( Ext 235) . I can see the production app is under a different extension(102) that is not mine. It belongs to another super admin, is there anyway to modify the extension in the app so that it uses mine ? that way i will be able to retrieve the information i need Or maybe there's something wrong with my parameters.

This is my code :

import json
from pprint import pprint

from ringcentral import SDK

with open('Ringcentral_call_log_Apisecrets.json') as f:
secrets = json.load(f)

rcsdk = SDK(secrets['clientId'], secrets['clientSecret'], secrets['server'])
platform = rcsdk.platform()
platform.login(secrets['username'], secrets['extension'], secrets['password'])

params = {
#'extensionNumber': '<ENTER VALUE>',
#'showBlocked': true,
#'phoneNumber': '<ENTER VALUE>',
#'direction': [ 'Inbound', 'Outbound' ],
#'sessionId': '<ENTER VALUE>',
#'type': [ 'Voice', 'Fax' ],
#'transport': [ 'PSTN', 'VoIP' ],
#'view': 'Simple',
#'withRecording': true,
#'recordingType': 'Automatic',
#'dateTo': '<ENTER VALUE>',
#'dateFrom': '<ENTER VALUE>',
#'page': 000,
#'perPage': 000,
#'showDeleted': true
'perPage': 1000
}

resp = platform.get('/restapi/v1.0/account/~/extension/~/call-log', params)
pprint(resp.json_dict())

Reply