Take your messaging services to the next level by using our Simple HTTP API.
The HTTP-API allows you to integrate your Application to ScrybaSMS using the HTTP protocol to send SMS.
Your Application may issue either a HTTP GET or POST request to the ScrybaSMS HTTP interface supplying a list of required parameters.
ScrybaSMS issues back a JSON Response which indicates the validity of the transaction.
To Use ScrybaSMS API you need to Register an Account first.
If you don't have a ScrybaSMS account yet, please visit our Sign-up page and create your free account. Sign-up page
Follow these Steps to Send Text Messages using ScrybaSMS HTTP API.
Request Parameters (All Required):
username,
password,
recipient,
senderid,
message
Request Parameter | Description |
---|---|
Request URL: |
http://api.scrybasms.com/legacy/message/send |
username |
Your ScrybaSMS Account Username. (Should be urlencoded) |
password |
Your ScrybaSMS Account Password. (Should be urlencoded) |
recipient |
Number must be in International telephone Number Format (without +) eg; 233299240910. |
senderid |
Must be max 11 alphanumeric chars without spaces or max of 14 numbers only. |
message |
Your Message. (Should be urlencoded) |
Issue an HTTP GET or POST request with all the Request Parameters to the Request URL as a result a JSON response is returned.
EXAMPLE REQUEST Username: testuser Password: secret From: ScrybaSMS To: 233299240910 Message: Welcome! To ScrybaSMS
http://api.scrybasms.com/legacy/message/send?username=testuser&password=secret&recipient=233299240910&senderid=ScrybaSMS&message=Welcome%21+To+ScrybaSMS
Your Request Response is in JSON format.
{ "results": { "Status":"0", "StatusMsg":"Message Sent Successfully", "MessageId":"117282929929303030", "Cost":"1.0000" } }
Rewrite in your preferred Programming Language.
$yourusername = 'testuser'; $yourpassword = 'secret'; $number = '233299240910'; $sender = 'ScrybaSMS'; $SMSMessage = 'Welcome! To ScrybaSMS'; $Request = "http://api.scrybasms.com/legacy/message/send?username=".urlencode($yourusername)."&password=".urlencode($yourpassword)."&recipient=".$number."&senderid=".urlencode($sender)."&message=".urlencode($SMSMessage).""; $Reponse = file_get_contents($Request); $ReponseDecoded = json_decode($Reponse); foreach ($ReponseDecoded as $Results) { $Status = $Results->Status; $StatusMsg = $Results->StatusMsg; $MessageId = $Results->MessageId; $Cost = $Results->Cost; } echo 'Message Status Code is: '.$Status; echo "<br>"; echo 'Message Status Message is: '.$StatusMsg; echo "<br>"; echo 'Message ID is: '.$MessageId; echo "<br>"; echo 'Message Cost is: '.$Cost; echo "<br>";
.
Request Parameters (All Required):
username,
password,
message_id
Request Parameter | Description |
---|---|
Request URL: |
http://api.scrybasms.com/legacy/message/delivery |
username |
Your ScrybaSMS Account Username. (Should be urlencoded) |
password |
Your ScrybaSMS Account Password. (Should be urlencoded) |
message_id |
The Unique Message ID for the Message. |
Issue an HTTP GET or POST request with all the Request Parameters to the Request URL as a result a JSON response is returned.
EXAMPLE REQUEST Username: testuser Password: secret Message Id: 117282929929303030
http://api.scrybasms.com/legacy/message/delivery?username=testuser&password=secret&message_id=117282929929303030
Your Request Response is in JSON format.
{ "results": { "Status":"0", "StatusMsg":"Message Found", "MessageId":"117282929929303030", "Sender":"ScrybaSMS", "To":"+233299240910", "Time":"2014-04-29 07:18:13", "DeliveryTime":"2014-04-29 07:18:14", "Cost":"1.0000", "Delivery":"DELIVERED", "Content":"Welcome! To ScrybaSMS" } }
Rewrite in your preferred Programming Language.
$yourusername = 'testuser'; $yourpassword = 'secret'; $message_id = '117282929929303030'; $Request = "http://api.scrybasms.com/legacy/message/delivery?username=".urlencode($yourusername)."&password=".urlencode($yourpassword)."&message_id=".$message_id.""; $Reponse = file_get_contents($Request); $ReponseDecoded = json_decode($Reponse); foreach ($ReponseDecoded as $Results) { $Status = $Results->Status; $StatusMsg = $Results->StatusMsg; $MessageId = $Results->MessageId; $Cost = $Results->Cost; $Sender = $Results->Sender; $To = $Results->To; $Time = $Results->Time; $DeliveryTime = $Results->DeliveryTime; $Delivery = $Results->Delivery; $Content = $Results->Content; } echo 'Message Status Code is: '.$Status; echo "<br>"; echo 'Message Status Message is: '.$StatusMsg; echo "<br>"; echo 'Message ID is: '.$MessageId; echo "<br>"; echo 'Message Cost is: '.$Cost; echo "<br>"; echo 'Message Sender is: '.$Sender; echo "<br>"; echo 'Message Recipient is: '.$To; echo "<br>"; echo 'Time Message was Sent is: '.$Time; echo "<br>"; echo 'Message Delivery Status is: '.$Delivery; echo "<br>"; echo 'Message Delivery Time is: '.$DeliveryTime; echo "<br>"; echo 'Message Content is: '.$Content; echo "<br>";
.
Request Parameters (All Required):
username,
password
Request Parameter | Description |
---|---|
Request URL: |
http://api.scrybasms.com/legacy/message/credits |
username |
Your ScrybaSMS Account Username. (Should be urlencoded) |
password |
Your ScrybaSMS Account Password. (Should be urlencoded) |
Issue an HTTP GET or POST request with all the Request Parameters to the Request URL as a result a JSON response is returned.
EXAMPLE REQUEST Username: testuser Password: secret
http://api.scrybasms.com/legacy/message/credits?username=testuser&password=secret
Your Request Response is in JSON format.
{ "results": { "credits":"356.9600" } }
Rewrite in your preferred Programming Language.
$yourusername = 'testuser'; $yourpassword = 'secret'; $Request = "http://api.scrybasms.com/legacy/message/credits?username=".urlencode($yourusername)."&password=".urlencode($yourpassword).""; $Reponse = file_get_contents($Request); $ReponseDecoded = json_decode($Reponse); foreach ($ReponseDecoded as $Results) { $Status = $Results->Status; $StatusMsg = $Results->StatusMsg; $credits = $Results->credits; } echo 'Message Status Code is: '.$Status; echo "<br>"; echo 'Message Status Message is: '.$StatusMsg; echo "<br>"; echo 'Account Balance is: '.$credits; echo "<br>";
Check the list of response codes for statuses and errors which could be returned by our API.
.
Status | Status Message / Meaning |
---|---|
0 |
Message Sent Successfully or Message Found for Delivery Report. |
1 |
Error: Please Try Again Later. |
2 |
Error: Recipient Network is not supported. |
3 |
Error: sender id not allowed. |
4 |
Error: Insufficient Credit. |
5 |
Error: Invalid Recipient Detected. |
6 |
Error: Authentication Error. |
7 |
Error: Check your Parameters. |
8 |
Error: Message does not Exist for Delivery Report. |
.
Parameter | Description |
---|---|
DELIVERED |
The message has been received by the handset. |
NOT_DELIVERED |
The messages failed to reach the handset. |
EXPIRED |
The carrier has timed out. |
Contact us any time if you need any Assistance integrating with our API. Contact Support