FarazSMS 1.1.2
dotnet add package FarazSMS --version 1.1.2
NuGet\Install-Package FarazSMS -Version 1.1.2
<PackageReference Include="FarazSMS" Version="1.1.2" />
<PackageVersion Include="FarazSMS" Version="1.1.2" />
<PackageReference Include="FarazSMS" />
paket add FarazSMS --version 1.1.2
#r "nuget: FarazSMS, 1.1.2"
#:package FarazSMS@1.1.2
#addin nuget:?package=FarazSMS&version=1.1.2
#tool nuget:?package=FarazSMS&version=1.1.2
FarazSMS (.NET)
FarazSMS · IranPayamak — فراز اس ام اس · ایران پیامک
Official .NET client for the FarazSMS / IranPayamak web services.
- Website: https://farazsms.com
- Panel: https://iranpayamak.com
Wraps all 63 endpoints — pattern/OTP sending, bulk SMS, reports, phonebook, and more. Uses only System.Net.Http.HttpClient and System.Text.Json — no external dependencies.
Install
dotnet add package FarazSMS
Quick start
using System;
using System.Threading.Tasks;
using FarazSMS;
class Program
{
static async Task Main()
{
var client = new FarazSMS("YOUR_API_KEY");
// Account balance
var balance = await client.Balance();
Console.WriteLine(balance);
// Send an OTP / pattern message
await client.SendPattern(
code: "abc123",
recipient: "09123456789",
attributes: new { code = "5821", name = "Ali" });
// Send a simple bulk message
await client.SendSimple(
"Hello from FarazSMS!",
new[] { "09123456789", "09120000000" });
try
{
await client.Balance();
}
catch (FarazException ex)
{
Console.WriteLine($"Error {ex.StatusCode}: {ex.Message}");
}
}
}
Authentication uses the Api-Key header (case-sensitive). The default sender line is 90008361, and every send includes "number_format": "english".
Methods
| Category | Method | HTTP | Endpoint |
|---|---|---|---|
| Low-level | Request(method, path, body, query) |
* | any |
| Account | Balance() |
GET | /ws/v1/account/balance |
| Account | Profile() |
GET | /ws/v1/account/profile |
| Account | Lines() |
GET | /ws/v1/lines/accessible |
| Send | SendPattern(code, recipient, attributes, line) |
POST | /ws/v1/sms/pattern |
| Send | SendSimple(text, recipients, line) |
POST | /ws/v1/sms/simple |
| Send | SendVariable(text, recipients, line) |
POST | /ws/v1/sms/keywords |
| Patterns | CreatePattern(payload) |
POST | /ws/v1/patterns |
| Patterns | Patterns(query) |
GET | /ws/v1/patterns |
| Reports | Inbox(page, limit) |
GET | /ws/v1/inbox |
| Reports | SendRequests(query) |
GET | /ws/v1/send_request |
| Reports | SendRequestItems(id, query) |
GET | /ws/v1/send_request/{id}/items |
| Phonebook | Phonebooks() |
GET | /ws/v1/phone_book |
| Phonebook | AddContact(payload) |
POST | /ws/v1/phone_book_data |
| Reference | Provinces() |
GET | /provinces |
| Reference | NumberBanks() |
GET | /ws/v1/number_bank |
All methods return Task<JsonElement> and throw FarazException (carrying the HTTP status code and message) on an error envelope.
License
MIT — see LICENSE.
| Product | Versions 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 is compatible. 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. |
-
.NETFramework 4.6.1
- System.Text.Json (>= 6.0.10)
-
.NETStandard 2.0
- System.Text.Json (>= 6.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.