در زیر نحوه استف��ده از متد GroupSMS  آورده شده است. برای اطلاع از عملکرد این متد و ورودی ها و خروجی های آن می توانید به بخش معرفی متدها GroupSMS رجوع کنید.

شما می توانید با استفاده از کلاس پیشنهادی زیر و متد SendGroup آن در برنامه خود عملیات ارسال پیام گروهی را انجام دهید.

{{:: 'controllers.documentation.chooseFramework' | translate }}
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
using NikSms.Library.Net.WebApi; using NikSms.Library.Net.ViewModels; using System.Threading.Tasks; using System; using System.Collections.Generic; namespace AwesomeApplication { public class NikSmsApiV1Client { private readonly PublicApiV1 service; public NikSmsApiV1Client(string username, string password, string culture = "fa") { service = new PublicApiV1(username, password, culture); } public async Task<string> SendGroup( string senderNumber, List<string> numbers, string message, DateTime? sendOn = null, int? sendType = null, List<string> yourMessageIds = null ) { var result = await service.GroupSms(senderNumber, numbers, message, sendOn, sendType, yourMessageIds); switch (result.Status) { case LibOperationResultStatus.Success: return result.Data; case LibOperationResultStatus.InvalidModel: throw new Exception("Some required inputs are misssing..."); case LibOperationResultStatus.UnAuthorized: throw new Exception("Some thing is wrong with your account (call support!)"); case LibOperationResultStatus.Failed: throw new Exception("Ooops its our fault!"); default: throw new Exception("You sould not be here... :D"); } } } }