C# SDK

Install and start using the C# SDK.

Intro

The CEQUENS APIs SDK provides access to the CEQUENS APIs REST APIs.

The CEQUENS CPaaS APIs: SMS, WhatsApp and other conversation channels, Voice, MFA/OTP verification, Number Discovery, the AI Hub knowledge base and Omni-Link notifications. Authenticate with a JWT from POST /auth/v1/tokens/ sent as Authorization: Bearer <token>.

Installation

Add the SDK as a project reference into your solution:

Terminal
dotnet add reference <path-to-sdk>/CequensApIs.csproj

Quick Start

Dependency Injection

Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through CequensApIsClientOptions.

C#
services.AddCequensApIsClient(options =>
{
    options.BearerAuth = "YOUR_BEARER_TOKEN";
    options.Environment = ServerEnvironment.Production;
    // TODO: configure more client options here
});

Direct Instantiation

Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through CequensApIsClientOptions.

C#
var httpClient = new HttpClient();
// TODO: configure more client options here
var options = new CequensApIsClientOptions
{
    BearerAuth = "YOUR_BEARER_TOKEN",
    Environment = ServerEnvironment.Production,
};
var client = new CequensApIsClient(httpClient, options);

On this page