WebHook API :Unlimited SMS Using Android Mobile

Convert your Android phone into an SMS gateway. Save money by using your phone to send and receive SMS messages via a simple programmable API

WebHook SMS GATEWAY

WebHook Example Script

Include following code in your PHP file to start sending messages.

You can get the API key from your : Account interface.

define("API_KEY", "Your API KEY");

try {
    if (isset($_SERVER["HTTP_X_SG_SIGNATURE"])) {
        if (isset($_POST["messages"])) {
            $hash = base64_encode(hash_hmac('sha256', $_POST["messages"], API_KEY, true));
            if ($hash === $_SERVER["HTTP_X_SG_SIGNATURE"]) {
                $messages = json_decode($_POST["messages"], true);
    
                /**
                 * For example :-
                 * $messages = [
                 *                 0 => [
                 *                          "ID" => "1",
                 *                          "number" => "+11234567890",
                 *                          "message" => "This is a test message.",
                 *                          "deviceID" => "1",
                 *                          "simSlot" => "0",
                 *                          "userID" => "1",
                 *                          "status" => "Received",
                 *                          "sentDate" => "2018-10-20T00:00:00+02:00",
                 *                          "deliveredDate" => "2018-10-20T00:00:00+02:00"
                 *                          "groupID" => null
                 *                      ]
                 *             ]
                 *
                 * senDate represents the date and time when the message was received on the device.
                 * deliveredDate represents the date and time when the message was received by the server.
                 */
    
                foreach ($messages as $message) {
                    if(strtolower($message["message"]) === "hi") {
                        // Reply to message using API or execute some commands. Possibilities are limitless.
                    }
                }
            } else {
                throw new Exception("Signature don't match!");
            }
        } else if (isset($_POST["ussdRequest"])) {
            $hash = base64_encode(hash_hmac('sha256', $_POST["ussdRequest"], API_KEY, true));
            if ($hash === $_SERVER["HTTP_X_SG_SIGNATURE"]) {
                $ussdRequest = json_decode($_POST["ussdRequest"]);
                $deviceID = $ussdRequest->deviceID;
                $simSlot = $ussdRequest->simSlot;
                $request = $ussdRequest->request;
                $response = $ussdRequest->response;
                
                // Do whatever you want with data you received.
            } else {
                throw new Exception("Signature don't match!");
            }
        }
    } else {
        http_response_code(400);
        error_log("Signature not found!");
    }
} catch (Exception $e) {
    http_response_code(401);
    error_log($e->getMessage());
}

Trusted by 3,781+ happy users who have sent or received more than 1,000,000+ messages.

Help Center

Frequently Asked Questions

If you still cannot find the answer to your question, send us an Email or ask in chat box .

The SMS8 application works only on Android phones at the moment since Apple doesn't allow you to install a custom SMS messaging app

SMS8 gateway application can run on any of the following Android verions: KitKat, Oreo, Lollipop, Pie, Marshmallow, 10, Nougat .
So you can install the application on your old Android phone which you don't use anymore.

Yes, your mobile device needs to be permanently connected to internet, using mobile data or wireless.

You can send SMS messages using the phone numbers added to the platform. Choose the sender ID or let it be sent randomly.

SMS8.io has a Free Plan . If your requirements are higher, you can upgrade to one of our Premium Plans.
An additional cost would be the SMS Plan from your Network Provider, which often includes unlimited SMS messages.