//Import Libraries
using System.Text;
using System.Net;
using System.Collections.Specialized;
using Newtonsoft.Json;
namespace AwesomeApplication
{
public class NikSmsApiV1Client
{
public async Task<NikSMsResultSend> GroupSMS(){
string url = "https://niksms.com/fa/publicapi/groupSms";
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["username"] = "YourUserName";
values["password"] = "YourPassword";
values["senderNumber"] = "*********";
values["numbers"] = "*********,**********";
values["sendOn"] = "2018/01/04-10:00";
values["sendType"] = "1";
values["yourMessageIds"] = "1001,1002";
values["message"] = "Here You Should Put Your Message Text";
var response = await client.UploadValues(url, values);
var responseString = Encoding.Default.GetString(response);
NikSMsResultSend result = JsonConvert.DeserializeObject<NikSMsResultSend>(responseString);
return result;
}
}
}
}