API Wrapper around SMSMisr

Overview

Introducing our C# wrapper for SMSMisr API.

Introduction

Today, we will introduce our C# wrapper for the API of SMSMisr (https://sms.com.eg), the leading SMS service in Egypt.

This wrapper has been published to:

GitHub: https://github.com/elsheimy/Elsheimy.Components.Sms.SmsMisr

NuGet: https://www.nuget.org/packages/Elsheimy.Components.Sms.SmsMisr

Prerequisites

You have to register in SMS Misr (https://sms.com.eg) service. After registration, follow the procedure to activate your first sender ID and to generate an API username and password through Developer API page.

Usage

You may send a message using the following code:

SmsRequest request = new SmsRequest();
request.Sender = "<sender id>";
request.Message = "<message>";
request.Language = MessageLanguage.English; // accepts English, Arabic and Unicode
request.MobileList = new string[] { "<mobile number>"};
     
SmsMisrService svc = new SmsMisrService("<API username>", "<API password>");
svc.SendSms(request);

Epilogue

The package has been created for version 2 of the API which was active during this writing. Feel free to update the code and to contact me whenever you need any help.