Skip to content

seven-io/net-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seven logo

Official .NET API Client

Send SMS, make voice calls, look up phone numbers, and more — via the seven API.

NuGet Version MIT License .NET Standard 2.0


Prerequisites

Installation

.NET CLI

dotnet add package seven-library

Package Manager

Install-Package seven-library

Package Reference

<PackageReference Include="seven-library" />

Quick Start

using System;
using System.Threading.Tasks;
using seven_library.Api;

class Program
{
    static async Task Main()
    {
        var client = new Client("YOUR_API_KEY");

        var balance = await client.Balance();
        Console.WriteLine($"Balance: {balance}");

        var sms = await client.Sms(new SmsParams
        {
            To = "+491234567890",
            Text = "Hello from seven!"
        });
    }
}

Usage Examples

Send SMS

var response = await client.Sms(new SmsParams
{
    To = "+491234567890",
    Text = "Hello from seven!",
    From = "MyApp"
});

Text-to-Speech Voice Call

var response = await client.Voice(new VoiceParams
{
    To = "+491234567890",
    Text = "Hello, this is a test call from seven."
});

Phone Number Lookup

var result = await client.Lookup(new LookupParams
{
    Number = "+491234567890",
    Type = LookupType.mnp,
    Json = true
});

Check Balance

var balance = await client.Balance();

All Features

Feature Description
SMS Send SMS messages
Voice Text-to-speech voice calls
RCS Send RCS messages
Lookup Phone number lookups (HLR, CNAM, MNP, Format)
Contacts Manage address book contacts
Hooks Manage webhooks
Balance Retrieve account balance
Analytics Retrieve account analytics
Journal Retrieve message journal
Pricing Retrieve pricing information
Status Retrieve message delivery status
ValidateForVoice Validate phone numbers for voice calls
Subaccounts Manage subaccounts

For more examples, see the examples directory.

Request Signing

For request signing pass your signing secret (found in your developer dashboard) as the fourth parameter:

var client = new Client("YOUR_API_KEY", "CSharp", false, "YOUR_SIGNING_SECRET");

Support

Need help? Feel free to contact us or open an issue.

License

MIT

Releases

No releases published

Contributors