Ozeki.Libs.Rest
1.0.0
dotnet add package Ozeki.Libs.Rest --version 1.0.0
NuGet\Install-Package Ozeki.Libs.Rest -Version 1.0.0
<PackageReference Include="Ozeki.Libs.Rest" Version="1.0.0" />
<PackageVersion Include="Ozeki.Libs.Rest" Version="1.0.0" />
<PackageReference Include="Ozeki.Libs.Rest" />
paket add Ozeki.Libs.Rest --version 1.0.0
#r "nuget: Ozeki.Libs.Rest, 1.0.0"
#:package Ozeki.Libs.Rest@1.0.0
#addin nuget:?package=Ozeki.Libs.Rest&version=1.0.0
#tool nuget:?package=Ozeki.Libs.Rest&version=1.0.0
C# sms library to send sms with http/rest/json
This C# sms library enables you to send sms from C# with http requests. You may also use it to receive sms from C# with http downloads. The library uses HTTP Post requests and JSON encoded content to send the text messages to the mobile network1. It connects to the HTTP SMS API of Ozeki SMS gateway. This repository is better for implementing SMS solutions then other alternatives, because it allows you to use the same code to send SMS through an Android mobile, through a high performance IP SMS connection or a GSM modem or modem pool. This library gives you SMS service provider independence.
What is Ozeki SMS Gateway
Ozeki SMS Gateway is a powerful SMS Gateway software you can download and install on your Windows or Linux computer or to your Android mobile phone. It provides an HTTP SMS API, that allows you to connect to it from local or remote programs. The reason why companies use Ozeki SMS Gateway as their first point of access to the mobile network, is because it provides service provider independence. When you use Ozeki, the SMS contact lists and sms data is safe, because Ozeki is installed in their own computer (physical or virutal), and Ozeki provides direct access to the mobile network through wireless connections.
Download: Ozeki SMS Gateway download page
Tutorial: C# send sms sample and tutorial
How to send sms from C#:
To send sms from C#
- Download Ozeki SMS Gateway
- Connect Ozeki SMS Gateway to the mobile network
- Create an HTTP SMS API user
- Checkout the Github send SMS from C# repository
- Open the Github SMS send example in Visual Studio
- Compile the Send SMS console project
- Check the logs in Ozeki SMS Gateway
How to use the code
To use the code you need to import the Ozeki.Libs.Rest sms library. This sms library is also included in this repositry with it's full source code. After the library is imported with the using statiment, you need to define the username, password and the api url. You can create the username and password when you install an HTTP API user in your Ozeki SMS Gateway system.
The URL is the default http api URL to connect to your SMS gateway. If you run the SMS gateway on the same computer where your C# code is runing, you can use 127.0.0.1 as the ip address. You need to change this if you install the sms gateway on a different computer (or mobile phone).
using Ozeki.Libs.Rest;
using System;
namespace SendSms
{
class Program
{
static void Main(string[] args)
{
var configuration = new Configuration()
{
Username = "http_user",
Password = "qwe123",
ApiUrl = "http://127.0.0.1:9509/api"
};
var msg = new Message()
{
ToAddress = "+36201111111",
Text = "Hello, World!"
};
var api = new MessageApi(configuration);
var result = api.Send(msg);
Console.WriteLine(result.ToString());
Console.ReadKey();
}
}
}
Manual / API reference
To get a better understanding of the above SMS code sample, it is a good idea to visit the webpage that explains this code in a more detailed way. You can find videos, explanations and downloadable content on this URL.
Link: How to send sms from C#
How to send sms through your Android mobile phone
If you wish to send SMS through your Android mobile phone from C#, you need to install Ozeki SMS Gateway on your Android mobile phone. It is recommended to use an Android mobile phone with a minimum of 4GB RAM and a quad core CPU. Most devices today meet these specs. The advantage of using your mobile, is that it is quick to setup and it often allows you to send sms free of charge.
Get started now
Don't waste any time, download the repository now, and send your first SMS!
| 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 | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
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 |
|---|---|---|
| 1.0.0 | 1,239 | 8/9/2021 |