2017-11-20 4 views
0

C# 웹 응용 프로그램에서 해당 API를 사용하여 RingCentral에 로그인하려고합니다. 웹 API를 처음 사용하고 RC 사용 방법을 잘 모릅니다. 나는 그들의 문서를 보았지만 성공하지 못했습니다. https://github.com/ringcentral/ringcentral-csharp-clientRingCentral API가있는 웹 응용 프로그램

포털에 로그인 할 수 있고 내 키가 모두 변경되지 않았기 때문에 내 credz 작업을 알았습니다.

첫 번째 오류 "await"키워드를 추가하면 내 메서드가 Page_Load에서 "async"메서드로 변경됩니다. 둘째 페이지 상속이 System.web.ui.page 또는 Ringcentral.page일까요?

결국 로그인하고 인바운드 및 아웃 바운드 통화 로그를 검색하여이를 gridview에 표시하려고합니다.

VS 2017을 사용하고 있으며 Web Forms 앱입니다. MVC 또는 웹 API를 선택하지 않았습니다. 나는 브레이크 포인트를 깨뜨릴 수 없다.

public partial class _Default : Page 
{ 
    //https://github.com/ringcentral/ringcentral-csharp-client 

    private static String appKey = ConfigurationManager.AppSettings["appKey"].ToString(); 
    private static String appSecret = ConfigurationManager.AppSettings["appSecretKey"].ToString(); 
    private static bool isProduction = Convert.ToBoolean(ConfigurationManager.AppSettings["IsProduction"].ToString()); 

    private static String userName = ConfigurationManager.AppSettings["username"].ToString(); 
    private static String extension = ConfigurationManager.AppSettings["extension"].ToString(); 
    private static String password = ConfigurationManager.AppSettings["password"].ToString(); 
    private RestClient rc = null; 

    protected async void Page_LoadAsync(object sender, EventArgs e) 
    { 

     rc = new RestClient(appKey, appSecret, isProduction); 
     await rc.Authorize(userName, extension, password); 

    } 
} 

웹 앱의 예제 웹 앱 또는 스텁 아웃 코드는 매우 유용합니다. 감사합니다, KSS

답변