Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodirbek-abdulaxadov/messager.eskizuz
Eskiz.uz sms xizmati yordamida xabar yuborish uchun package
https://github.com/nodirbek-abdulaxadov/messager.eskizuz
csharp otp sms
Last synced: 28 days ago
JSON representation
Eskiz.uz sms xizmati yordamida xabar yuborish uchun package
- Host: GitHub
- URL: https://github.com/nodirbek-abdulaxadov/messager.eskizuz
- Owner: Nodirbek-Abdulaxadov
- License: mit
- Created: 2023-12-20T08:53:20.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-15T15:46:30.000Z (11 months ago)
- Last Synced: 2024-04-26T17:45:00.686Z (8 months ago)
- Topics: csharp, otp, sms
- Language: C#
- Homepage:
- Size: 22.5 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Tavsif
Messager, SMS xabarlarini yuborish uchun ma'lum [Eskiz.uz](https://eskiz.uz/sms) API xizmatidan foydalanish uchun yaratilgan .NET kutubxonasi. U bir martalik parollar (OTP) va odatiy matnli xabarlarni yuborish jarayonini sodda funksionallik orqali osonlashtiradi.## O'rnatish
Messager NuGet paketini quyidagi buyruq yordamida o'rnatishingiz mumkin:```bash
dotnet add package Messager.EskizUz
```## Boshlash
Messagerdan foydalanish uchun siz e-mail va maxfiy kalitni taqdim etib, Messager klassining misolini yaratishingiz kerak. Klass autentifikatsiya va belgilangan so'rov uchun belgilangan to'kenni olishni avtomatik ravishda boshlaydi.```csharp
using Messager.EskizUz;// Messager obyektini yarating
var messager = new MessagerAgent("[email protected]", "sizning-maxfiy-kalitingiz");
```## OTP SMS Yuborish
Messager orqali OTP SMS xabarlarni osonlik bilan yuborishingiz mumkin. Telefon raqamiga bir martalik OTP kod yuborish uchun SendOtpAsync metodidan foydalaning.```csharp
// OTP SMS yuborish
var natija = await messager.SendOtpAsync("+998901234567");
if (natija.Success)
{
Console.WriteLine($"OTP muvaffaqiyatli yuborildi. Kod: {natija.Code}");
}
else
{
Console.WriteLine("OTP SMS yuborishda xatolik yuz berdi.");
}
```## Odatiy SMS Yuborish
SendSMSAsync metodidan foydalanib odatiy matnli SMS xabarlarni yuborishingiz mumkin.```csharp
// Odatiy SMS yuborish
var yuborildi = await messager.SendSMSAsync("+998901234567", "Salom Messager.EskizUz dan!");
if (yuborildi)
{
Console.WriteLine("SMS muvaffaqiyatli yuborildi.");
}
else
{
Console.WriteLine("SMS yuborishda xatolik yuz berdi.");
}
```## Muhim Eslatmalar
Ma'lum email va maxfiy kalitingiz bilan "[email protected]" va "sizning-maxfiy-kalitingiz" ni almashtiring.## Ogohlantirish
Ushbu kutubxona sodda shaklda taqdim etilgan va har bir yuz berishi mumkin bo'lgan xatolar boshqaruvini o'z ichiga olmaydi. Sizning mahsulotingizga mos ravishda xato boshqaruvini yanada rivojlantirish tavsiya etiladi.## Litsenziya
Ushbu kutubxona [MIT litsenziyasi](https://opensource.org/license/mit/) asosida tarqalgan.