ScrybaSMS HTTP API


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.


HTTP REQUEST

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.
password Your ScrybaSMS Account Password.
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 Message Should be urlencoded.

USAGE:

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

Request:


http://api.scrybasms.com/legacy/message/send?username=testuser&password=secret&recipient=233299240910&senderid=ScrybaSMS&message=Welcome%21+To+ScrybaSMS


Response [Format : JSON]:

Your Request Response is in JSON format.

 {
	"results":
	{
		"Status":"0",
		"StatusMsg":"Message Sent Successfully",
		"MessageId":"117282929929303030",
		"Cost":"1.0000"
	}
}

EXAMPLE CODE USING PHP

Rewrite in your preferred Programming Language.

    $yourusername = 'testuser';
    $yourpassword = 'secret';
    $number = '233299240910';
    $sender = 'ScrybaSMS';
    $SMSMessage = urlencode('Welcome! To ScrybaSMS');

    $Request = "http://api.scrybasms.com/legacy/message/send?username=".$yourusername."&password=".$yourpassword."&recipient=".$number."&senderid=".$sender."&message=".$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>";

.


HTTP REQUEST

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.
password Your ScrybaSMS Account Password.
message_id The Unique Message ID for the Message.

USAGE:

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

Request:


http://api.scrybasms.com/legacy/message/delivery?username=testuser&password=secret&message_id=117282929929303030


Response [Format : JSON]:

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"
        }
 }

EXAMPLE CODE USING PHP

Rewrite in your preferred Programming Language.

    $yourusername = 'testuser';
    $yourpassword = 'secret';
    $message_id = '117282929929303030';

    $Request = "http://api.scrybasms.com/legacy/message/delivery?username=".$yourusername."&password=".$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>";

.


HTTP REQUEST

Request Parameters (All Required):
username,
password

Request Parameter Description
Request URL: http://api.scrybasms.com/legacy/message/credits
username Your ScrybaSMS Account Username.
password Your ScrybaSMS Account Password.

USAGE:

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

Request:


http://api.scrybasms.com/legacy/message/credits?username=testuser&password=secret


Response [Format : JSON]:

Your Request Response is in JSON format.

 {
        "results":
        {
           "credits":"356.9600"
        }
 }

EXAMPLE CODE USING PHP

Rewrite in your preferred Programming Language.

    $yourusername = 'testuser';
    $yourpassword = 'secret';

    $Request = "http://api.scrybasms.com/legacy/message/credits?username=".$yourusername."&password=".$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.


API Status Codes

.

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.

Delivery Status Codes

.

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