I have the following console application that I'm using to test the SDK to see if we can get back the call records for our company.
static void Main(string[] args)
{
var Task = DoStuff();
Task.Wait();
}
static public async Task<Boolean> DoStuff() {
RingCentral.RestClient rc = new RingCentral.RestClient("fakekey", "fakesecret", true);
await rc.Authorize("16159059217", "100104", "fakepassword");
var calllogs = await rc.Restapi().Account("~").Extension("100104").CallLog().List();
return true;
}
However, when the code get's the the line beginning 'var calllogs', I get the error below:
System.AggregateException
HResult=0x80131500
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at ConsoleApp1.Program.Main(String[] args) in C:_workRingCentralSDK TestConsoleApp1Program.cs:line 15
Inner Exception 1:
FlurlHttpException: Call failed with status code 404 (Not Found): GET https://platform.ringcentral.com/restapi/v1.0/account/~/extension/100104/call-log
Not sure what I'm doing wrong. I'm trying to follow the documentation associated with the c# sdk on github.