Send SMS, make voice calls, look up phone numbers, and more — via the seven API.
- .NET Standard 2.0 compatible project (.NET Core 2.0+, .NET Framework 4.6.1+, .NET 5+)
- A seven account with API key (How to get your API key)
.NET CLI
dotnet add package seven-libraryPackage Manager
Install-Package seven-libraryPackage Reference
<PackageReference Include="seven-library" />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!"
});
}
}var response = await client.Sms(new SmsParams
{
To = "+491234567890",
Text = "Hello from seven!",
From = "MyApp"
});var response = await client.Voice(new VoiceParams
{
To = "+491234567890",
Text = "Hello, this is a test call from seven."
});var result = await client.Lookup(new LookupParams
{
Number = "+491234567890",
Type = LookupType.mnp,
Json = true
});var balance = await client.Balance();| 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.
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");Need help? Feel free to contact us or open an issue.