Hi,
I am able to run aggregate code perfectly for aggregate call with
resp = platform.post('/analytics/calls/v1/accounts/~/aggregate/fetch',options),
but i am getting 'Unable to Authenticate : HTTP 400 error . when i use
resp = platform.post('/analytics/calls/v1/accounts/~/timeline/fetch',options)
Why ? Can anyone suggest what is wrong with this url ?
from ringcentral import SDK
import os,sys,json
from dotenv import load_dotenv
load_dotenv()
import pandas as pd
rcsdk = SDK( os.environ.get('RC_CLIENT_ID'),
os.environ.get('RC_CLIENT_SECRET'),
os.environ.get('RC_SERVER_URL') )
platform = rcsdk.platform()
try:
# print(os.environ.get('RC_SERVER_URL') )
platform.login(os.environ.get('RC_USERNAME'),
os.environ.get('RC_EXTENSION'),
os.environ.get('RC_PASSWORD'))
options = {
"grouping": {
"groupBy": "Users",
"keys": []
},
"timeSettings": {
"timeZone": "US/Pacific",
"timeRange": {
"timeFrom": "2023-01-01T00:00:00.877Z",
"timeTo": "2023-04-01T04:01:33.877Z"
},
"advancedTimeSettings": {
"includeDays": [
"Sunday"
],
"includeHours": [
{
"from": "00:00",
"to": "23:59"
}
]
}
}
}
resp = platform.post('/analytics/calls/v1/accounts/~/timeline/fetch',options)
jsonObj = resp.json_dict()