string loginEmail = "Spread@reasonables.com";
string apiKey = "TEST0000-TEST-0000-TEST-0000TEST0000";
string subject = "Test MMS 6";
string mmsContent = "Test MMS 6";
string imageLocalPath = @"D:\Documents\test.png";
string imgBase64String = Convert.ToBase64String(System.IO.File.ReadAllBytes(imageLocalPath));
string imageBase64String = System.Web.HttpUtility.UrlEncode(imgBase64String);
string sender = "";
string[] phoneSubscribers = new string[] { "85212341234", "85298769876" };
string[] category = { "" };
string campaingId = spreadAPI.SendMMS(loginEmail, apiKey, subject, mmsContent, imageBase64String, sender, DateTime.Now, CampaignStatus.Waiting, phoneSubscribers, category);
Dim loginEmail As String = "Spread@reasonables.com"
Dim apiKey As String = "TEST0000-TEST-0000-TEST-0000TEST0000"
Dim subject As String = "Test MMS 6"
Dim mmsContent As String = "Test MMS 6"
Dim imgBase64String As String = Convert.ToBase64String(IO.File.ReadAllBytes(imageLocalPath))
Dim imageBase64String As String = System.Web.HttpUtility.UrlEncode(imgBase64String)
Dim sender As String = "Spread"
Dim schedule As String = "2022-06-15T14:50:50"
Dim campaignStatus As String = "Waiting"
Dim phoneSubscribers As String() = { "85212341234" }
Dim category As String() = {""}
Dim postData As String = "loginEmail=" & loginEmail
postData &= "&apiKey=" & apiKey
postData &= "&subject=" & subject
postData &= "&mmsContent=" & mmsContent
postData &= "&imageBase64String=" & imageBase64String
postData &= "&sender=" & sender
postData &= "&schedule=" & schedule
postData &= "&campaignStatus=" & campaignStatus
For Each phone In phoneSubscribers
postData &= "&phoneSubscribers=" & phone
Next
For Each c In category
postData &= "&category=" & c
Next
Dim webRequest As WebRequest = WebRequest.Create("{{YOUR_API_URL}}/SendMMS")
webRequest.ContentType = "application/x-www-form-urlencoded"
webRequest.Method = "POST"
Dim bytes() As Byte = Encoding.UTF8.GetBytes(postData)
Dim os As Stream = Nothing
webRequest.ContentLength = bytes.Length
os = webRequest.GetRequestStream()
os.Write(bytes, 0, bytes.Length)
os.Close()
Dim webResponse As WebResponse
webResponse = webRequest.GetResponse()
Dim sr As StreamReader = New StreamReader(webResponse.GetResponseStream())
Return sr.ReadToEnd().Trim()
No sample for PHP.
POST {{YOUR_API_URL}}/service.asmx
Content-Type: application/soap+xml; charset=utf-8
Content-Length: {{length}}
<!-- Send Transactional MMS HTTP Body -->
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendMMS xmlns="http://service.reasonablespread.com/">
<loginEmail>Spread@reasonables.com</loginEmail>
<apiKey>TEST0000-TEST-0000-TEST-0000TEST0000</apiKey>
<subject>Test</subject>
<mmsContent>Test</mmsContent>
<imageBase64String>iVBORw0KGgoAAAANSUhEUgAA</imageBase64String>
<sender></sender>
<schedule>2022-12-20T14:50:50</schedule>
<campaignStatus>Waiting</campaignStatus>
<phoneSubscribers>
<string>85212345678</string>
<string>85212345679</string>
</phoneSubscribers>
<category></category>
</SendMMS>
</soap12:Body>
</soap12:Envelope>
<!-- Send Promotional SMS HTTP Body -->
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendMMS xmlns="http://service.reasonablespread.com/">
<loginEmail>Spread@reasonables.com</loginEmail>
<apiKey>TEST0000-TEST-0000-TEST-0000TEST0000</apiKey>
<subject>Test</subject>
<mmsContent>Test</mmsContent>
<imageBase64String>iVBORw0KGgoAAAANSUhEUgAA</imageBase64String>
<sender></sender>
<schedule>2022-12-20T14:50:50</schedule>
<campaignStatus>Waiting</campaignStatus>
<phoneSubscribers></phoneSubscribers>
<category>
<string>subscriptionName</string>
<string>contactListName</string>
</category>
</SendMMS>
</soap12:Body>
</soap12:Envelope>