I am running below code from my console application and it works perfectly and I can fetch data
static async Task GetCallLogs() { var rc = new RestClient(RINGCENTRAL_CLIENT_ID, RINGCENTRAL_CLIENT_SECRET, RINGCENTRAL_PRODUCTION_URL); await rc.Authorize("username", "ext", "password"); // making api calls }
But when I am doing the same thing from the .NET framework controller, system hangs at await
public void UpdateRingCentral() { var t= new GetCallLogs(); t.Wait(); }
public async Task GetCallLogs() { var rc = new RestClient(RINGCENTRAL_CLIENT_ID, RINGCENTRAL_CLIENT_SECRET, RINGCENTRAL_PRODUCTION_URL); await rc.Authorize("username", "ext", "password"); // making api calls }
Any advice or suggestions for fixing this issue.