PostaGuvercini.NET.SMS 0.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package PostaGuvercini.NET.SMS --version 0.0.5
                    
NuGet\Install-Package PostaGuvercini.NET.SMS -Version 0.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PostaGuvercini.NET.SMS" Version="0.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PostaGuvercini.NET.SMS" Version="0.0.5" />
                    
Directory.Packages.props
<PackageReference Include="PostaGuvercini.NET.SMS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PostaGuvercini.NET.SMS --version 0.0.5
                    
#r "nuget: PostaGuvercini.NET.SMS, 0.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PostaGuvercini.NET.SMS@0.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PostaGuvercini.NET.SMS&version=0.0.5
                    
Install as a Cake Addin
#tool nuget:?package=PostaGuvercini.NET.SMS&version=0.0.5
                    
Install as a Cake Tool

PostaGuvercini.NET.SMS

A C# library for sending SMS messages using the Posta Guvercini SMS API.

Features

  • Send OTP, informational, and advertisement SMS messages
  • Personalize messages for each receiver
  • Track message delivery status
  • Check account credit
  • Advanced options: scheduling, expiration, SIM card check, dealer code, and more

Installation

Install via NuGet:

dotnet add package PostaGuvercini.NET.SMS

Usage

Initialization

using PostaGuvercini.NET.SMS;

var sms = new SMS("API_DOMAIN", "YOUR_PUBLIC_KEY", "YOUR_PRIVATE_KEY");

Or with options:

var sms = new SMS(new SMSOptions {
    Domain = "API_DOMAIN",
    PublicKey = "YOUR_PUBLIC_KEY",
    PrivateKey = "YOUR_PRIVATE_KEY",
    Timeout = TimeSpan.FromSeconds(30)
});

Or can be injected via dependency injection:

services.AddSMS(ServiceLifetime.Transient, (provider) => 
    new SMSOptions {
        Domain = "API_DOMAIN",
        PublicKey = "YOUR_PUBLIC_KEY",
        PrivateKey = "YOUR_PRIVATE_KEY",
        Timeout = TimeSpan.FromSeconds(30)
    });
// Later in your code, you can retrieve the ISMS instance or inject it into your classes:
ISMS sms = provider.GetRequiredService<ISMS>();
// Or inject it directly into your class constructor
public class MyController : ControllerBase
{
    private readonly ISMS _sms;

    public MyController(ISMS sms)
    {
        _sms = sms;
    }

    // Use _sms in your actions
}

API Reference

  • From(senderId): Set sender ID (required)
  • Text(text, encoding): Set message text and encoding
  • To(mobileNumber, ...): Add receiver(s)
  • Purpose(purpose): Set message purpose (OTP, INFORMATIONAL, ADVERT)
  • Label(label): Set reporting label
  • ReferenceId(referenceId): Set reference ID
  • SendTime(dateTime): Schedule message
  • ExpireTime(dateTime): Set expiration
  • CheckSimCard(): Enable SIM card change check (OTP only)
  • DealerCode(code): Set dealer code

Notes

  • Sender ID must be pre-registered with the SMS provider.
  • OTP messages: max 10 receivers per request.
  • Regular messages: max 10,000 receivers per request.

Sending a Simple SMS

await sms
    .From("SENDERID")
    .Text("Hello, this is a test message!")
    .To(905555555555)
    .SendInformationalAsync();

Sending Personalized OTP SMS

await sms
    .From("SENDERID")
    .Text("Hello {{1}}, your login code is {{2}}")
    .To(905550000000, ["John Doe", "123456"])
    .To(905551111111, ["Alex Doe", "567890"])
    .SendOtpAsync();

Sending Different Texts to Multiple Receivers

await sms
    .From("SENDERID")
    .To(905550000000, text: "Hello John, your code is 123456")
    .To(905551111111, text: "Hello Alex, your code is 567890")
    .SendInformationalAsync();

Sending Bulk SMS

await sms
    .From("SENDERID")
    .Text("This is a bulk message to multiple recipients.")
    .Label("My Bulk Message")
    .To([ 905550000000,
          905551111111,
          905552222222 ])
    .SendAdvertAsync();

Checking Message Status

var status = await sms.StatusAsync("MESSAGE_ID");

Checking Credit

var credit = await sms.CreditAsync();

For more information, contact Posta Guvercini support.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.7 158 8/31/2025
0.0.6 148 8/31/2025
0.0.5 168 8/10/2025