Skip to content

grokify/ringcentral-sdk-csharp-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RingCentral Simple SDK for C# / .NET

Nuget Version Docs License

This is a simple wrapper around the RingCentral C# SDK to make common API calls easier to access. The RingCentral SDK client object is available via the simple client and can be introduced via a dependency injection.

The code is a very early proof of concept.

Installation

Via NuGet:

PM> Install-Package RingCentral
PM> Install-Package RingCentralSimple

Quickstart

Initialization

using RingCentral;
using RingCentralSimple;

Send an SMS

This can be done simply using the SendMessage() method which returns a RingCentral.SDK.Http.Response object. This assumes that the accountId and extensionId are the default ids for the authorized user.

// Instantiate SDK
var sdk = new RingCentral.SDK.SDK("appKey", "appSecret", "serverUrl", "appName", "appVersion");
var rc = new RingCentralSimple.Client(sdk);

// Authorize User using OAuth Password Grant
rc.Sdk.GetPlatform().Authorize("username", "extension", "password", true);

// SendMessage takes the following parameters: ("fromNumber", "toNumber", "message")
var response = rc.SendMessage("+15551112222", "+15553334444", "RingCentral SMS via C#");

Access RingCentral Client

The official RingCentral C# SDK is available via the Sdk property.

var rc = new RingCentralSimple.Client("appKey", "appSecret", "serverUrl");
var rcsdk = rc.Sdk;

License

RingCentral Simple SDK for C# is available under an MIT-style license. See the LICENSE.txt file for details.

RingCentral Simple SDK for C# © 2015-2016 by John Wang