// Primary
https://smtpapi.vocotext.com/isms_send_all_id.php
// Mirror 2
https://smtpapi2.vocotext.com/isms_send_all_id.php
// Mirror 3
https://www.isms.com.my/isms_send_all_id.phpusing System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
class IsmsSender
{
// Reuse HttpClient — do not create per request
private static readonly HttpClient _client = new HttpClient();
static async Task<string> SendSmsAsync(string mobile, string message)
{
var payload = new Dictionary<string, string>
{
{ "un", "your_username" }, // iSMS username
{ "pwd", "your_password" }, // iSMS password
{ "dstno", mobile }, // e.g. "601X-XXXXXXX"
{ "msg", message },
{ "type", "1" }, // 1 = ASCII, 2 = Unicode
{ "agreedterm", "YES" },
{ "sendid", "MyBrand" } // Optional, max 11 chars
};
var content = new FormUrlEncodedContent(payload);
var response = await _client.PostAsync(
"https://smtpapi.vocotext.com/isms_send_all_id.php", content);
var result = await response.Content.ReadAsStringAsync();
return result;
}
static async Task Main()
{
var result = await SendSmsAsync("601X-XXXXXXX", "Hello from iSMS!");
if (result.StartsWith("2000"))
{
var trxId = result.Split(':')[1];
Console.WriteLine($"SMS sent! Transaction ID: {trxId}");
}
else
{
Console.WriteLine($"Failed: {result}");
}
}
}2000 = SUCCESS:1143007207
// Save the transaction ID for delivery tracking-1001 = AUTHENTICATION FAILED
-1003 = IP NOT ALLOWED
-1004 = INSUFFICIENT CREDITS
-1008 = MISSING PARAMETER
-1013 = INVALID TERM AGREEMENTRegister free, get your API credentials, and start sending in minutes.