【问题标题】:Web app with RingCentral API带有 RingCentral API 的网络应用程序
【发布时间】:2017-11-20 16:22:52
【问题描述】:

我正在尝试让我的 C# Web 应用程序使用他们的 API 登录到 RingCentral。 我是使用 Web API 的新手,不知道如何使用 RC。我查看了他们的文档,但没有成功。 https://github.com/ringcentral/ringcentral-csharp-client

我知道我的 credz 工作,因为我可以登录他们的门户,而且我所有的密钥都没有改变。

我在添加“await”关键字时收到的第一个错误是它想将我的方法从 Page_Load 更改为“async”方法。 其次是页面继承,应该是 System.web.ui.page 还是 Ringcentral.page?

最后我希望能够登录和检索呼入和呼出呼叫日志并将它们显示在网格视图中。

我正在使用 VS 2017,它是一个 Web 表单应用程序。我没有选择 MVC 或 Web 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

【问题讨论】:

    标签: c# asp.net ringcentral


    【解决方案1】:

    一个示例网络应用程序或一个网络应用程序的存根代码会非常有帮助。

    有关使用 RingCentral C# Client SDK 的示例 Web 应用程序,请参阅以下使用 Nancy Web 框架 (http://nancyfx.org/) 的 OAuth 身份验证代码演示。

    https://github.com/ringcentral/ringcentral-demos-oauth/tree/master/csharp-nancy

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-06
      • 2018-03-04
      • 1970-01-01
      相关资源
      最近更新 更多